Clone project
git clone https://github.com/yuong1979/flask.git
Change directory into the project
cd flaskproj
Start a the virtual environment
python3 -m venv venv
Run the virtual environment
source venv/bin/activate
Run the virtual environment
pip install -r requirements.txt
Run the server only local
python3 main.py
Access app through url http://localhost:5000/
Comment out the production code on Dockerfile
Build the image
docker build -t flaskapp .
Deploy the image
docker run -p 5000:5000 flaskapp
Access app through url http://localhost:5000/
Comment out the development code on Dockerfile
Initialize gcloud
gcloud init
Build image
gcloud builds submit --tag gcr.io/test-python-api-spreadsheets/flaskapp
Deploy image
gcloud run deploy --image gcr.io/test-python-api-spreadsheets/flaskapp