A dictionary!
This is a straightfoward Python Flask application which can be run in several ways including locally via python, as a Docker container, or in Google Cloud Run.
From the root dir of the app:
$ python app.py
The app will be available on localhost port 8080 (e.g., http://0.0.0.0:8080
)
From the root dir of the app:
$ docker build -t whats-the-word . && docker run --rm -p 8080:8080 -e PORT=8080 whats-the-word
The app will be available on localhost port 8080 (e.g., http://0.0.0.0:8080
)
- OR -
From the root dir of the app:
$ gcloud builds submit . --config=cloudbuild.yaml
The build results will provide a unique URL for the app.
Prerequisites:
- The Cloud Build, Cloud Run, and Secret Manager APIs must be enabled, and Cloud Build must be granted permission to administrate Cloud Run (visit Cloud Build Service account permissions to grant this permission).
- A Cloud Storage bucket for Terraform state must exist, named "$PROJECT_ID-tf-state".
- The Terraform builder image must be available in your project:
- Clone the builder
- Run
gcloud builds submit --substitutions=_TERRAFORM_VERSION="0.15.5",_TERRAFORM_VERSION_SHA256SUM="3b144499e08c245a8039027eb2b84c0495e119f57d79e8fb605864bb48897a7d"
- The GitHub CLI builder image
- Clone and build/push
- Configure token secret as described in
github
builder README