-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (49 loc) Β· 1012 Bytes
/
docker-compose.yaml
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
43
44
45
46
47
48
49
50
51
52
53
version: '3.9'
networks:
common-net: {}
services:
db:
container_name: organizator_db
env_file:
- ./organizator_api/.env
image: postgres:alpine
ports:
- "5432:5432"
expose:
- 5432
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U admin -d postgres'"]
interval: 10s
timeout: 10s
retries: 5
networks:
- common-net
volumes:
- postgres_data:/var/lib/postgresql/data/
api:
build: ./organizator_api
container_name: organizator_api
env_file:
- ./organizator_api/.env
depends_on:
db:
condition: service_healthy
ports:
- "8000:8000"
restart: unless-stopped
networks:
- common-net
volumes:
- ./organizator_api:/code
#web:
#build: ./organizator
#command: npm start
#container_name: organizator
#depends_on:
# - api
#ports:
# - "3000:3000"
#restart: unless-stopped
volumes:
postgres_data: