Open yegle opened 3 years ago
Another advantage of Cloud Run: you can have a script to import Miniflux Docker image to Google Cloud Registry, and modify a .tfvars
file with the latest image's SHA256. You can then periodically run the script, then run terraform apply
to upgrade. This is much simpler then requiring to check the terraform output
then run gcloud app deploy
.
Note this is also doable in App Engine but less straightforward: the script would clone the git repo at a release tag, zip it and upload to GCS, modify the .tfvars
file, and use google_app_engine_standard_app_version
to deploy the GCS file to App Engine.
Thanks for the suggestion. We can add a flag to also set up Cloud Run instead of letting the user set up App engine afterward.
You mentioned that
The usual advantage of using App Engine (compare to Cloud Run) is that App Engine provides a way to persist data (the datastore), which is useless to Miniflux.
Correct me if I'm wrong. Miniflux persists data into a PostgreSQL database, which is not provided by App engine, hence the need for the CloudSQL database. I don't think Cloud Run provides persistence either.
You are right. What I mean is, App Engine having a data persistent backend (with free tier) is a big reason many people prefer App Engine over Cloud Run, but specific to hosting Miniflux that advantage irrelevant.
Can you make a PR? We probably should add a flag and optional configuration for Cloud Run. Make sure that this new Terraform setup works given the instructions in README and the whole setup is able to be created and destroyed with terraform destroy
.
One advantage of using Cloud Run is that you can then use miniflux's official docker image (albeit you need to import it to Google Container Registry first).
The usual advantage of using App Engine (compare to Cloud Run) is that App Engine provides a way to persist data (the datastore), which is useless to Miniflux.