# App.yaml file
# https://cloud.google.com/appengine/docs/standard/python3/config/appref
runtime: python39
instance_class: F2
env_variables:
DJANGO_SETTINGS_MODULE: "settings"
DB_NAME: "db_name"
DB_USERNAME: "db_user"
DB_PASSWORD: "db_password"
DB_HOST: "/cloudsql/double-media-xxxx:europe-west1:db_name"
DB_PORT: 3306
DB_TIMEOUT: 5000
handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: static/
# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
# .github/workflows/deploy
# https://cloud.google.com/python/django/appengine
# https://github.com/actions-hub/gcloud:
name: deploy-app-to-gcp
on:
push:
branches: [ main]
paths:
- 'app/**'
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-hub/gcloud@master
env:
PROJECT_ID: ${{secrets.GCLOUD_PROJECT_PROD_ID}}
APPLICATION_CREDENTIALS: ${{secrets.GCLOUD_GITHUB_CREDENTIALS}}
with:
args: app deploy ./app.yaml
Share this page on
0
People Like(s) This Page
Permalink
comments powered by Disqus