-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
103 lines (95 loc) · 2 KB
/
docker-compose.yaml
File metadata and controls
103 lines (95 loc) · 2 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
version: '3.3'
services:
server-1:
build: server
ports:
- ${SERVER_PORT}
restart: always
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_HOSTNAME: ${MYSQL_HOSTNAME}
PORT: ${SERVER_PORT}
HOST: ${HOST}
FRONTEND_URL: ${FRONTEND_URL}
SOCKET_IO_URL: ${SOCKET_IO_URL}
links:
- todolistdb
depends_on:
- todolistdb
networks:
- loadbalancing
deploy:
replicas: 2
socket-server-1:
build: socket-server
ports:
- ${SOCKET_IO_PORT}
restart: always
environment:
PORT: ${SOCKET_IO_PORT}
HOST: ${HOST}
FRONTEND_URL: ${FRONTEND_URL}
REDIS_PORT: ${REDIS_PORT}
links:
- todolistdb
- redis
depends_on:
- todolistdb
networks:
- loadbalancing
deploy:
replicas: 2
todolistdb:
build: db
restart: always
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_RANDOM_ROOT_PASSWORD: '1'
networks:
- loadbalancing
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
ports:
- "8085:80"
environment:
PMA_HOST: todolistdb
networks:
- loadbalancing
frontend:
build:
context: ./frontend
args:
- VITE_NGINX_URL=${VITE_NGINX_URL}
- VITE_FRONTEND_PORT=${FRONTEND_PORT}
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
environment:
- VITE_NGINX_URL=${VITE_NGINX_URL}
networks:
- loadbalancing
nginx:
image: nginx:latest
ports:
- "${NGINX_PORT}:${NGINX_PORT}"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- loadbalancing
depends_on:
- frontend
- server-1
- socket-server-1
restart: always
redis:
image: redis:alpine
expose:
- "${REDIS_PORT}"
networks:
- loadbalancing
networks:
loadbalancing: