31 lines
561 B
YAML
31 lines
561 B
YAML
|
|
services:
|
||
|
|
db:
|
||
|
|
image: postgres:16
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: postgres
|
||
|
|
POSTGRES_PASSWORD: postgres
|
||
|
|
POSTGRES_DB: goodwalk
|
||
|
|
volumes:
|
||
|
|
- pgdata:/var/lib/postgresql/data
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||
|
|
interval: 5s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
|
||
|
|
api:
|
||
|
|
build: ./backend
|
||
|
|
env_file: ./backend/.env
|
||
|
|
ports:
|
||
|
|
- "8000:8000"
|
||
|
|
depends_on:
|
||
|
|
db:
|
||
|
|
condition: service_healthy
|
||
|
|
volumes:
|
||
|
|
- ./backend:/app
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
pgdata:
|