-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
42 lines (40 loc) · 823 Bytes
/
docker-compose.yaml
File metadata and controls
42 lines (40 loc) · 823 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
version: "3"
services:
db:
image: postgres:16
container_name: db
restart: always
command: -p 3131
# volumes:
# - "postgres:/var/lib/postgresql/data"
# ports:
# - 3131:5432
expose:
- 3131
env_file:
- .env
healthcheck:
test: ["CMD", "pg_isready", "-h", "localhost", "-p", "3131", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
env_file:
- .env
container_name: exchange_rates_api
restart: always
ports:
- 8001:8000
depends_on:
db:
condition: service_healthy
command: ["/exchange_rates_api/docker/app.sh"]
healthcheck:
test: ["CMD", "nc", "-z", "db", "3131"]
interval: 10s
timeout: 5s
retries: 30
#volumes:
# postrges: