-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
73 lines (67 loc) · 1.56 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
version: '3.9'
services:
client:
container_name: "client-app"
build: ./client-app/.
ports:
- '8080:80'
depends_on:
- redis
- db
- api-server
- worker-server
api-server:
container_name: "api-server"
build: ./api-server/.
environment:
- PORT=5001
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_CHANNEL=${REDIS_CHANNEL}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_USER=${MYSQL_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- '5001:5001'
depends_on:
- db
- redis
- worker-server
worker-server:
container_name: "worker-server"
build: ./worker-server/.
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_CHANNEL=${REDIS_CHANNEL}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_USER=${MYSQL_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
depends_on:
- db
- redis
db:
container_name: "mysql-db"
image: mysql:latest
restart: always
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_USER: ${MYSQL_ROOT_USER}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
ports:
- '3306:3306'
volumes:
- ./db-data:/var/lib/mysql
redis:
container_name: "redis-service"
image: redis:latest
restart: always
ports:
- '6379:6379'
volumes:
- ./redis-data:/data
volumes:
db-data:
redis-data: