-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 888 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (34 loc) · 888 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
services:
backend:
image: pharmacy-web-backend
environment:
DB_URL: ${DB_URL}
DB_USERNAME: ${POSTGRES_USERNAME}
DB_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- backend_data:/app/files
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--spider", "--tries=1", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
ports:
- 8080:8080
db:
image: postgres:16.10-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USERNAME: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD", "pg_isready", "-U", "$${POSTGRES_USERNAME}"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- db_data:/var/lib/postgresql/data
volumes:
db_data:
backend_data: