-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
108 lines (100 loc) · 1.97 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
version: '3'
services:
client_web:
build:
context: ./web
dockerfile: Dockerfile
args:
REACT_APP_API_URL: $REACT_APP_API_URL
REACT_APP_ARENA_URL: $REACT_APP_ARENA_URL
restart: unless-stopped
environment:
- NODE_ENV=production
- API_HOST=server
env_file:
- .env
volumes:
- apk-vol:/web/build/apk
ports:
- "8081:80"
depends_on:
- client_mobile
- server
client_mobile:
build:
context: ./mobile
dockerfile: Dockerfile
args:
KOTLIN_API_HOST: $KOTLIN_API_HOST
KOTLIN_HOST: $KOTLIN_HOST
volumes:
- apk-vol:/data/apk
env_file:
- .env
server:
restart: unless-stopped
environment:
- NODE_ENV=production
- DB_HOST=db
- REDIS_HOST=redis
env_file:
- .env
networks:
- "db-tier"
- "redis-tier"
build: ./server
depends_on:
- db
- redis
ports:
- "8080:80"
worker:
build: ./server
command: node . worker
restart: unless-stopped
environment:
- REDIS_HOST=redis
- DB_HOST=db
env_file:
- .env
networks:
- "redis-tier"
- "db-tier"
depends_on:
- redis
- db
db:
image: "mongo:4.0.14"
restart: unless-stopped
environment:
- MONGO_INITDB_ROOT_USERNAME=$DB_USER
- MONGO_INITDB_ROOT_PASSWORD=$DB_PASS
- MONGO_INITDB_DATABASE=$DB_NAME
env_file:
- .env
ports:
- '${DB_PORT}:27017'
networks:
- "db-tier"
volumes:
- db-vol:/data/db
- ./scripts/initdb.sh:/docker-entrypoint-initdb.d/initdb.sh
redis:
image: "redis:buster"
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
restart: unless-stopped
ports:
- '${REDIS_PORT}:6379'
env_file:
- .env
volumes:
- redis-vol:/data
networks:
- "redis-tier"
networks:
db-tier:
redis-tier:
volumes:
apk-vol:
db-vol:
redis-vol: