-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
114 lines (107 loc) · 2.57 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./backend:/home/node/backend
- /home/node/backend/node_modules
depends_on:
valkey-standalone:
condition: service_healthy
valkey-cluster:
condition: service_healthy
networks:
- valkey-net
environment:
- EXECUTION_MODE=standalone
- VALKEY_HOST_STANDALONE=valkey-standalone
- VALKEY_PORT_STANDALONE=6379
- VALKEY_HOST_CLUSTER=valkey-cluster
- VALKEY_PORT_CLUSTER_START=7000
- VALKEY_PORT_CLUSTER_END=7005
- VUE_APP_WS_URL=ws://localhost:8080/appws
- WDS_SOCKET_PORT=443
- START_SCRIPT=${START_SCRIPT}
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- backend
networks:
- valkey-net
environment:
- VUE_APP_BACKEND_URL=http://backend:3000
- VUE_APP_WS_URL=ws://localhost:8080/appws
- WDS_SOCKET_PORT=443
valkey-standalone:
image: valkey/valkey:8.0.1
ports:
- "6379:6379"
networks:
- valkey-net
volumes:
- valkey-standalone-data:/data
command: ["sh", "-c", "valkey-server --port 6379 --dir /data"]
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6379", "ping"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
privileged: true
valkey-cluster:
image: valkey/valkey:8.0.1
ports:
- "7000-7005:7000-7005"
networks:
- valkey-net
volumes:
- ./backend/cluster-setup.sh:/usr/local/bin/cluster-setup.sh:ro
- valkey-cluster-data:/data
command: ["sh", "/usr/local/bin/cluster-setup.sh"]
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7000", "cluster", "info"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
privileged: true
python-executor:
build:
context: ./backend
dockerfile: Dockerfile.python
image: python-executor
ports:
- "3002:3002"
networks:
- valkey-net
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "3002"]
interval: 5s
timeout: 5s
retries: 3
valkey-node:
build:
context: ./backend
dockerfile: Dockerfile.node
ports:
- "3001:3001"
networks:
- valkey-net
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "3001"]
interval: 5s
timeout: 5s
retries: 3
networks:
valkey-net:
driver: bridge
volumes:
valkey-standalone-data:
valkey-cluster-data: