forked from DigiFi/digifi-BankToProductCore
36 lines
910 B
YAML
36 lines
910 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:13
|
|
environment:
|
|
- POSTGRES_USER=${DATABASE_USER}
|
|
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
|
|
- POSTGRES_DB=${DATABASE_NAME}
|
|
ports:
|
|
- "${DATABASE_PORT}:${DATABASE_PORT}"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
digifi-bank-to-product-core:
|
|
build: .
|
|
ports:
|
|
- "${APP_PORT:-4500}:5000"
|
|
environment:
|
|
- FLASK_APP=wsgi.py
|
|
- FLASK_ENV=development
|
|
- DATABASE_URL=postgresql+psycopg2://${DATABASE_USER}:${DATABASE_PASSWORD}@db:${DATABASE_PORT}/${DATABASE_NAME}?options=-csearch_path%3Dflask_app
|
|
volumes:
|
|
- .:/app
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: always
|
|
|
|
volumes:
|
|
postgres_data: |