Skip to content

Instantly share code, notes, and snippets.

@ytimocin
Created February 14, 2020 23:03
Show Gist options
  • Save ytimocin/49acb5ed2500d71ec1fab739033607e9 to your computer and use it in GitHub Desktop.
Save ytimocin/49acb5ed2500d71ec1fab739033607e9 to your computer and use it in GitHub Desktop.
The docker-compose.yml file for the flaks-postgres-server project
version: '3.6'
services:
api:
build: .
depends_on:
- db
environment:
STAGE: test
SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://test:test@db/test
networks:
- default
ports:
- 5000:5000
volumes:
- ./app:/usr/src/app/app
- ./migrations:/usr/src/app/migrations
restart: always
db:
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
image: postgres:latest
networks:
- default
ports:
- 5405:5432
restart: always
volumes:
- ./postgres-data:/var/lib/postgresql/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment