Skip to content

Instantly share code, notes, and snippets.

@ardydedase
Created May 31, 2020 07:43
Show Gist options
  • Select an option

  • Save ardydedase/cce7d80ccaa9ebe86fbcec90954ab162 to your computer and use it in GitHub Desktop.

Select an option

Save ardydedase/cce7d80ccaa9ebe86fbcec90954ab162 to your computer and use it in GitHub Desktop.
services:
- type: web
name: flask-postgres-api
env: python
repo: https://github.com/ardydedase/flask-postgres-api.git
plan: starter
branch: master
healthCheckPath: /healthcheck
# Use ./migrations.sh when running for the first time
buildCommand: "pip install -r requirements.txt && ./run-migrations.sh"
startCommand: "cd src && gunicorn main:app"
envVars:
- fromGroup: flask-postgres-api-settings
- key: POSTGRES_URL
fromDatabase:
name: flask-postgres-api-db
property: host
- key: POSTGRES_USER
fromDatabase:
name: flask-postgres-api-db
property: user
- key: POSTGRES_PASSWORD
fromDatabase:
name: flask-postgres-api-db
property: password
- key: POSTGRES_DB
fromDatabase:
name: flask-postgres-api-db
property: database
envVarGroups:
- name: flask-postgres-api-settings
envVars:
- key: ENV
value: production
- key: FLASK_APP
value: src/main.py
databases:
- name: flask-postgres-api-db
databaseName: mydb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment