{"id":21683396,"url":"https://github.com/blairnangle/dockerized-flask-on-gce","last_synced_at":"2026-04-14T15:33:17.308Z","repository":{"id":109354842,"uuid":"429762025","full_name":"blairnangle/dockerized-flask-on-gce","owner":"blairnangle","description":"Bare-bones, Dockerized Flask app running on a Container-Optimized OS Google Compute Engine instance. Infrastructure provisioning and deployment using GitHub Actions.","archived":false,"fork":false,"pushed_at":"2022-11-24T09:32:28.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T11:25:22.861Z","etag":null,"topics":["docker","flask","github-actions","google-compute-engine"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blairnangle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-19T10:47:13.000Z","updated_at":"2023-12-12T18:27:40.000Z","dependencies_parsed_at":"2023-04-18T05:04:07.118Z","dependency_job_id":null,"html_url":"https://github.com/blairnangle/dockerized-flask-on-gce","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blairnangle/dockerized-flask-on-gce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blairnangle%2Fdockerized-flask-on-gce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blairnangle%2Fdockerized-flask-on-gce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blairnangle%2Fdockerized-flask-on-gce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blairnangle%2Fdockerized-flask-on-gce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blairnangle","download_url":"https://codeload.github.com/blairnangle/dockerized-flask-on-gce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blairnangle%2Fdockerized-flask-on-gce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","flask","github-actions","google-compute-engine"],"created_at":"2024-11-25T16:11:47.591Z","updated_at":"2026-04-14T15:33:17.291Z","avatar_url":"https://github.com/blairnangle.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockerized-flask-on-gce\n\nBare-bones, Dockerized Flask app running on a Container-Optimized OS Google Compute Engine instance. Infrastructure\nprovisioning and deployment using GitHub Actions.\n\n## Local development\n\n### Installation\n\n* Create a virtual environment:\n\n```shell\n$ python3 -m venv .venv\n```\n* Activate the virtual environment:\n\n```shell\n$ source .venv/bin/activate\n```\n\n* Install requirements:\n\n```shell\n$ pip install -r requirements.txt\n```\n\n### Building image\n\n```shell\n$ docker build -t dockerized-flask-on-gce:local .\n```\n\n### Running image\n\n```shell\n$ docker run -p 6969:6969 dockerized-flask-on-gce:local\n```\n\n## Deployment\n\n### First time\n\n- Manually create a project on Google Cloud Platform and make a note of the project ID (not the project number)\n- Enable the following APIs for the project:\n  - Google Compute Engine (GCE)—VM upon which the container will run\n  - Identity and Access Management (IAM) API—this enables use of newly created service account\n  - Artifact Registry API—private repository for Docker images\n  - Cloud Resource Manager API—interacting with containers\n- Create a service account with owner access to project\n- Create service account key and download\n- Manually create a storage bucket to act as the Terraform backend—this must be globally unique and must match the value\nprovided in `infra/main.tf`\n\n### Configuring GitHub Actions\n\nThe following Secrets need to be set:\n\n- `GCP_PROJECT_ID`\n- `GCP_SERVICE_ACCOUNT_KEY`\n- `GCP_SERVICE_ACCOUNT_KEY_FLATTENED` (see below)\n\n#### Flattening the service account key\n\nTerraform expects a flattened version of the service account key. See\n[these instructions](https://www.haigmail.com/2019/10/07/setting-up-google_credentials-for-terraform-cloud/) for how to\ndo this.\n\n### Business as usual\n\nCommit and push! Successful CI/CD pipelines will result in a new image, tagged with the commit SHA, being built and\ndeployed each time, with old images being pruned from the VM.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblairnangle%2Fdockerized-flask-on-gce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblairnangle%2Fdockerized-flask-on-gce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblairnangle%2Fdockerized-flask-on-gce/lists"}