31 lines
492 B
YAML
31 lines
492 B
YAML
version: "3"
|
|
services:
|
|
db:
|
|
image: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- db_storage:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
hostname: "db"
|
|
|
|
app:
|
|
build: .
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
links:
|
|
- db
|
|
ports:
|
|
- "8000:8000"
|
|
env_file:
|
|
- .env
|
|
|
|
volumes:
|
|
db_storage: |