-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
149 lines (141 loc) · 3.42 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: '3'
services:
hewwod-nginx:
container_name: hewwod-nginx
build:
context: ./dockerfiles
dockerfile: Dockerfile-nginx
volumes:
- ./etc/nginx/sites/local.conf:/etc/nginx/conf.d/default.conf
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./static:/usr/share/nginx/html
- ./keys/dh-param/dhparam-2048.pem:/etc/ssl/certs/dhparam-2048.pem
- ./keys/letsencrypt/hewwod.com/fullchain.pem:/etc/letsencrypt/live/hewwod.com/fullchain.pem
- ./keys/letsencrypt/hewwod.com/privkey.pem:/etc/letsencrypt/live/hewwod.com/privkey.pem
- ./static/letsencrypt:/data/letsencrypt
- ./var/log/nginx:/var/log/nginx
depends_on:
- "hewwod-api"
deploy:
resources:
limits:
memory: 20M
reservations:
memory: 10M
ports:
- "80:80"
- "443:443"
networks:
- app-network
restart: always
hewwod-mongo:
container_name: hewwod-mongo
build:
context: ./dockerfiles
dockerfile: Dockerfile-mongo
deploy:
resources:
limits:
memory: 120M
cpus: '0.50'
reservations:
memory: 80M
cpus: '0.25'
ports:
- "27017:27017"
expose:
- "27017"
networks:
- app-network
restart: always
hewwod-api:
container_name: hewwod-api
build:
context: ./dockerfiles
dockerfile: Dockerfile-api
volumes:
- ./app:/home/node/app
- ./config:/home/node/app/config
- ./node_modules:/home/node/app/node_modules
environment:
- NODE_ENV=production
command: "node api.js"
depends_on:
- "hewwod-mongo"
deploy:
resources:
limits:
memory: 120M
cpus: '0.50'
reservations:
memory: 100M
cpus: '0.25'
ports:
- "3001:3001"
networks:
- app-network
restart: always
hewwod-rss:
container_name: hewwod-rss
build:
context: ./dockerfiles
dockerfile: Dockerfile-rss
volumes:
- ./services:/home/node/app
- ./config:/home/node/app/config
- ./keys:/home/node/app/keys
- ./node_modules:/home/node/app/node_modules
environment:
- NODE_ENV=production
command: "node rss-wod-parser.js"
depends_on:
- "hewwod-mongo"
deploy:
resources:
limits:
memory: 120M
cpus: '0.50'
reservations:
memory: 100M
cpus: '0.25'
networks:
- app-network
restart: always
hewwod-notifications:
container_name: hewwod-notifications
build:
context: ./dockerfiles
dockerfile: Dockerfile-notifications
volumes:
- ./services:/home/node/app
- ./config:/home/node/app/config
- ./keys:/home/node/app/keys
- ./node_modules:/home/node/app/node_modules
environment:
- NODE_ENV=production
command: "node notifications.js"
depends_on:
- "hewwod-mongo"
deploy:
resources:
limits:
memory: 120M
cpus: '0.50'
reservations:
memory: 100M
cpus: '0.25'
networks:
- app-network
restart: always
letsencrypt-nginx-container:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./etc/nginx/sites/letsencrypt.conf:/etc/nginx/conf.d/default.conf
- ./static/letsencrypt:/usr/share/nginx/html
networks:
- app-network
networks:
app-network:
driver: bridge