forked from OSU-MC/Open-Response
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-stack.yml
More file actions
85 lines (82 loc) · 1.7 KB
/
docker-stack.yml
File metadata and controls
85 lines (82 loc) · 1.7 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
version: "3.8"
services:
frontend:
image: openresponse_frontend
ports:
- "3000:80"
environment:
VITE_API_URL: "http://backend:3001"
VITE_SOCKET_URL: "http://localhost:3002"
networks:
- openresponse_network
deploy:
replicas: 1
restart_policy:
condition: on-failure
backend:
image: openresponse_backend
dns:
- 8.8.8.8
- 8.8.4.4
depends_on:
- db
environment:
DEV_DB_HOST: db
DEV_DB_PORT: 3306
DEV_DB_PASS: password
TEST_DB_HOST: db
TEST_DB_PORT: 3306
TEST_DB_PASS: password
entrypoint: ["./entrypoint.sh"]
ports:
- "3001:3001"
networks:
- openresponse_network
deploy:
replicas: 1
restart_policy:
condition: on-failure
socket:
image: openresponse_socket
environment:
CLIENT_URL: "http://localhost:3000"
SOCKET_PORT: 3002
build:
context: ./socket
ports:
- "3002:3002"
networks:
- openresponse_network
deploy:
replicas: 1
restart_policy:
condition: on-failure
db:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: rootpassword
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
- ./core/db/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test:
[
"CMD-SHELL",
"mysqladmin ping -h localhost -u root -prootpassword || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
networks:
- openresponse_network
deploy:
replicas: 1
restart_policy:
condition: on-failure
volumes:
db_data:
networks:
openresponse_network:
external: true