-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
123 lines (112 loc) · 2.43 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
version: "3.4"
x-base: &base
env_file: backend/.env
build:
context : backend/
dockerfile: Dockerfile
services:
db:
container_name: mongo
build:
context : db/mongo/
dockerfile: Dockerfile
volumes:
- dbdata:/data/db
env_file: db/mongo/.env
sqldb:
container_name: postgres
build:
context : db/postgres/
dockerfile: Dockerfile
volumes:
- sqldata:/var/lib/pgdata
env_file: db/postgres/.env
app:
<<: *base
container_name: nodeapp
entrypoint: ['entrypoints/start_server.sh']
volumes:
- ./backend:/backend
- modules_back:/backend/node_modules
healthcheck:
test: 'curl --fail http://localhost:4000/api/health/ || exit 1'
interval: 2m
timeout: 10s
retries: 3
depends_on:
- db
ports:
- '4000:4000'
socketio:
<<: *base
container_name: socketio
entrypoint: ['entrypoints/start_ws_server.sh']
volumes:
- ./backend:/backend
- modules_back:/backend/node_modules
healthcheck:
test: 'npx wscat -c ws://localhost:9000/socket.io/\?transport=websocket -x exit || exit 1'
interval: 1m
timeout: 10s
retries: 3
depends_on:
- db
ports:
- '9000:9000'
jobsworker:
<<: *base
container_name: jobsworker
entrypoint: ['entrypoints/start_worker_server.sh']
volumes:
- ./backend:/backend
- modules_back:/backend/node_modules
healthcheck:
# test: 'curl --fail http://localhost:3000/health/ || exit'
interval: 1m
timeout: 10s
retries: 3
depends_on:
- db
frontend:
build:
network: host
context : frontend/
dockerfile: Dockerfile
container_name: react
entrypoint: ['./entrypoint.sh']
volumes:
- ./frontend/:/frontend
- modules:/frontend/node_modules
env_file: frontend/.env
ports:
- '3000:3000'
links:
- app:app
- proxy:proxy
- socketio:socketio
depends_on:
- app
proxy:
container_name: proxy_nginx
image: nginx:alpine
volumes:
- ./proxy/:/etc/nginx/conf.d
- ./frontend/build:/var/www/frontend
ports:
- "80:80"
- "443:443"
links:
- app:app
depends_on:
- app
redis:
image: redis:alpine
container_name: redis
volumes:
dbdata:
sqldata:
backend:
modules:
modules_back:
static_volume:
media_volume: