34 lines
683 B
YAML
34 lines
683 B
YAML
version: '4.1'
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
volumes:
|
|
- .:/app
|
|
environment:
|
|
POSTGRES_CONNECTION_STRING: "postgresql://app:app@db:5432/app"
|
|
PYTHONBREAKPOINT: remote_pdb.set_trace
|
|
REMOTE_PDB_PORT: 4444
|
|
REMOTE_PDB_HOST: 0.0.0.0
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- 8000:8000
|
|
- 4444:4444
|
|
|
|
db:
|
|
image: postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: app
|
|
POSTGRES_PASSWORD: app
|
|
POSTGRES_DB: app
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U app -d app"]
|
|
interval: 3s
|
|
timeout: 10s
|
|
retries: 3
|