-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) 路 943 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (40 loc) 路 943 Bytes
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
33
34
35
36
37
38
39
40
41
42
services:
save-contacts-app:
build: .
container_name: save-contacts-app
restart: unless-stopped
environment:
- DB_HOST
- DB_PORT
- DB_NAME
- DB_USER
- DB_PASS
- NIMBLE_API_URL
- NIMBLE_API_KEY
ports:
- "8000:8000"
expose:
- "8000"
depends_on:
save-contacts-db:
condition: service_healthy
save-contacts-db:
image: postgres:18-alpine
container_name: save-contacts-db
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME:-contacts_db}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-postgres}
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-contacts_db}" ]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
volumes:
pg_data: