-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
161 lines (152 loc) · 3.13 KB
/
docker-compose.yml
File metadata and controls
161 lines (152 loc) · 3.13 KB
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
150
151
152
153
154
155
156
157
158
159
160
services:
db:
profiles:
- catalog
- production
image: mysql:8
restart: always
env_file:
- .env
volumes:
- db:/var/lib/mysql
networks:
- splice
expose:
- '3306'
ports:
- '127.0.0.1:3306:3306'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
meilisearch:
image: getmeili/meilisearch:v1.35.0
container_name: meilisearch
profiles:
- catalog
- production
environment:
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
volumes:
- meili_data:/meili_data
expose:
- '7700'
ports:
- '127.0.0.1:7700:7700'
networks:
- splice
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
catalog:
profiles:
- catalog
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/app
- /app/node_modules
command: ["sh", "-c", "yarn migrate && yarn dev"]
env_file:
- .env
depends_on:
db:
condition: service_healthy
meilisearch:
condition: service_healthy
# lti-validator:
# condition: service_started
chrome:
condition: service_started
ports:
- '127.0.0.1:3000:3000'
- '127.0.0.1:9229:9229'
networks:
- splice
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 30s
chrome:
profiles:
- catalog
- production
image: browserless/chrome:latest
ports:
- '127.0.0.1:3001:3000'
networks:
- splice
prod:
profiles:
- production
build:
context: .
dockerfile: Dockerfile.prod
env_file:
- .env
restart: always
entrypoint: ["pm2-runtime", "./process.yml"]
depends_on:
db:
condition: service_healthy
# lti-validator:
# condition: service_healthy
volumes:
- staticvolume:/home/deploy/app/dist/public
- ./uploads:/home/deploy/app/uploads
ports:
- '127.0.0.1:3000:3000'
networks:
- splice
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 30s
nginx:
profiles:
- production
build:
context: ./nginx
dockerfile: Dockerfile
restart: always
command: ['nginx', '-g', 'daemon off;']
volumes:
- ./certs:/etc/certs
- staticvolume:/collected-static
ports:
- 80:80
- 443:443
depends_on:
- prod
networks:
- splice
lti-validator:
build:
context: ./src/lti-microservice
ports:
- "127.0.0.1:4000:4000"
networks:
- splice
restart: always
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4000/validate']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
db:
staticvolume:
meili_data:
networks:
splice: