-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
38 lines (35 loc) Β· 760 Bytes
/
Copy pathcompose.yml
File metadata and controls
38 lines (35 loc) Β· 760 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
services:
postgres:
image: postgres:latest
container_name: binventory-db
volumes:
- binventory-db:/var/lib/postgresql/data
env_file:
- .env.prod
healthcheck:
test: ["CMD-SHELL", "echo", "$POSTGRES_DB","&&","pg_is_ready", "-d", "$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- binventory-net
app:
build: .
container_name: binventory-app
env_file: .env.prod
environment:
DATABASE_HOST: postgres
DATABASE_PORT: 5432
networks:
- binventory-net
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
networks:
binventory-net:
driver: bridge
volumes:
binventory-db: