blob: bc8214abd6bc6c08fb1960a14c9c7b02466d4145 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
services:
db:
image: postgres:16
environment:
POSTGRES_DB: db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "54321:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
web:
image: diddle:latest
build: .
environment:
BASE_URL: http://localhost:8000
DB_PASSWORD: postgres
DB_HOST: db
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
db-data:
|