https://github.com/fpgmaas/cloudrun-example-api
An example API used in the blogpost 'Deploying a Flask API to Google Cloud Run using Terraform'
https://github.com/fpgmaas/cloudrun-example-api
blogpost docker flask flask-api poetry python
Last synced: 5 days ago
JSON representation
An example API used in the blogpost 'Deploying a Flask API to Google Cloud Run using Terraform'
- Host: GitHub
- URL: https://github.com/fpgmaas/cloudrun-example-api
- Owner: fpgmaas
- Created: 2022-06-16T17:36:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-22T14:17:25.000Z (about 3 years ago)
- Last Synced: 2025-03-23T13:51:44.200Z (3 months ago)
- Topics: blogpost, docker, flask, flask-api, poetry, python
- Language: Dockerfile
- Homepage: https://fpgmaas.com/blog/deploying-a-flask-api-to-cloudrun-2
- Size: 21.5 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cloudrun-example-api
This is a repository that contains the code used to create a Dockerized Flask API and to deploy it to Google Artifact Repository, used for [this blog post](https://fpgmaas.com/blog/deploying-a-flask-api-to-cloudrun-2). The related GitHub repository with the Flask API can be found [here](https://github.com/fpgmaas/cloudrun-example-api).## Running the Docker container
First, build the container with
```
docker build . -t flask_api
```Then, run the container with
```
docker run -d --env PORT=5000 -p 5000:5000 flask_api
```## Deploying the image to Google Cloud
To deploy the Docker image to Google Cloud, simply create a new release on `main` through the GitHub UI.
By default, the image is pushed to `europe-west4-docker.pkg.dev/my-cloudrun-api/docker-repository/my-api:`.---
[](https://deploy.cloud.run/?git_repo=https://github.com/fpgmaas/cloudrun-example-api.git)