-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (60 loc) · 1.2 KB
/
docker-compose.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
services:
nginx:
image: nginx:latest
ports:
- 80:80
configs:
- source: nginx_config
target: /etc/nginx/nginx.conf
networks:
- public
depends_on:
server:
condition: service_healthy
restart: true
server:
image: manasc478/acm-website-server:latest
environment:
- NODE_ENV=development
env_file:
- .env
networks:
- private
- public
depends_on:
db:
condition: service_healthy
restart: true
healthcheck:
test: ["CMD", "curl", "-f", "http://server:5001"]
interval: 5s
retries: 5
start_period: 5s
timeout: 5s
db:
image: postgres:latest
volumes:
- acm_website_db_data:/var/lib/postgresql/data
- ./db-scripts:/docker-entrypoint-initdb.d/
env_file:
- .env
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5
start_period: 15s
networks:
- private
volumes:
acm_website_db_data:
networks:
public:
private:
ipam:
config:
- subnet: "192.0.0.0/24"
gateway: "192.0.0.1"
configs:
nginx_config:
file: ./nginx.conf