-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
68 lines (62 loc) · 1.87 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
version: '2.2'
services:
delos:
container_name: rap2-delos
image: taomaree/rap2:1.0.6
environment:
- MYSQL_URL=rap2-mysql
- MYSQL_PORT=3306
- MYSQL_USERNAME=rap2
- MYSQL_PASSWD=rap2delos
- MYSQL_SCHEMA=RAP2_DELOS_APP
- REDIS_URL=rap2-redis
- REDIS_PORT=6379
- NODE_ENV=production
working_dir: /app/rap2-delos/dist
volumes:
- "/srv/rap2-mysql/mysql-backup:/backup"
ports:
- "38080:80" # expose 38080
links:
- redis
- mysql
depends_on:
- redis
- mysql
redis:
container_name: rap2-redis
image: redis:4.0
mysql:
container_name: rap2-mysql
image: mysql:8.0
#ports:
# - 33306:3306
volumes:
- "/srv/rap2-mysql/mysql-data:/var/lib/mysql"
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --init-connect='SET NAMES utf8mb4;' --default-authentication-plugin=mysql_native_password --innodb-flush-log-at-trx-commit=0
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=RAP2_DELOS_APP
- MYSQL_USER=rap2
- MYSQL_PASSWORD=rap2delos
rap2-init:
container_name: rap2-init
image: taomaree/rap2:1.0.6
environment:
- MYSQL_URL=rap2-mysql
- MYSQL_PORT=3306
- MYSQL_USERNAME=rap2
- MYSQL_PASSWD=rap2delos
- MYSQL_SCHEMA=RAP2_DELOS_APP
- REDIS_URL=rap2-redis
- REDIS_PORT=6379
- NODE_ENV=production
working_dir: /app/rap2-delos
#command: 'mysql -h${MYSQL_URL} -u${MYSQL_USERNAME} -p${MYSQL_PASSWD} -e "select * from ${MYSQL_SCHEMA}.Users;" || npm run create-db'
command: ["bash", "-c", "sleep 30 && mysql -h$${MYSQL_URL} -u$${MYSQL_USERNAME} -p$${MYSQL_PASSWD} -e \"select * from $${MYSQL_SCHEMA}.Users;\" || node dist/scripts/init"]
links:
- redis
- mysql
depends_on:
- redis
- mysql