30 lines
561 B
YAML
30 lines
561 B
YAML
version: '4.1'
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
volumes:
|
|
- .:/app
|
|
environment:
|
|
POSTGRES_CONNECTION_STRING: "postgresql://app:app@db:5432/app"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- 8000:8000
|
|
|
|
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
|