-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
161 lines (151 loc) · 3.35 KB
/
docker-compose.yml
File metadata and controls
161 lines (151 loc) · 3.35 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
161
services:
firewall:
build:
context: ./firewall
dockerfile: Dockerfile
container_name: firewall
restart: unless-stopped
ports:
- "${FIREWALL_PORT}:${FIREWALL_PORT}"
volumes:
- shared_logs:/var/log/shared
env_file:
- .env
networks:
- clients
- servers
reverse-proxy:
build:
context: ./reverse-proxy/
dockerfile: Dockerfile
container_name: reverse-proxy
restart: unless-stopped
depends_on:
- client
- server
ports:
- "80:80"
- "443:443"
networks:
- clients
- servers
volumes:
- shared_logs:/var/log/shared
- /etc/letsencrypt:/etc/letsencrypt:ro
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${REVERSE_PROXY_PORT}"]
interval: 30s
timeout: 3s
retries: 3
redis:
image: redis:7-alpine
container_name: redis_storage
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD}"]
networks:
- servers
volumes:
- redis_data:/data
- shared_logs:/var/log/shared
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 30s
timeout: 3s
retries: 3
server:
build:
context: ./backend-servers/server/
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
expose:
- ${SERVER_PORT}
networks:
- servers
volumes:
- shared_logs:/var/log/shared
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${SERVER_PORT}/status"]
interval: 30s
timeout: 3s
retries: 3
client:
build:
context: ./client/
dockerfile: Dockerfile
args:
VITE_PRODUCTION: ${VITE_PRODUCTION}
VITE_API_HOST: ${VITE_API_HOST}
VITE_API_PORT: ${VITE_API_PORT}
container_name: client
restart: unless-stopped
expose:
- "${CLIENT_PORT}"
networks:
- clients
volumes:
- shared_logs:/var/log/shared
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${CLIENT_PORT}"]
interval: 30s
timeout: 3s
retries: 3
client_terminal:
build:
context: ./client_terminal/
dockerfile: Dockerfile
container_name: client_terminal
restart: unless-stopped
depends_on:
- firewall
networks:
- clients
volumes:
- ./client_terminal:/app
stdin_open: true
tty: true
profiles:
- client_terminal
dashboard:
build:
context: ./dashboard/
dockerfile: Dockerfile
container_name: dashboard
restart: unless-stopped
depends_on:
- redis
expose:
- ${DASHBOARD_PORT}
networks:
- clients
- servers
volumes:
- redis_data:/app/redis_data:ro
- shared_logs:/var/log/shared
- dashboard_data:/data
- ./firewall/rules.json:/var/log/shared/firewall/rules.json:Z
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${DASHBOARD_PORT}"]
interval: 30s
timeout: 3s
retries: 3
volumes:
shared_logs:
driver: local
redis_data:
driver: local
dashboard_data:
driver: local
networks:
clients:
servers: