-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose-sql-sync.yml
50 lines (46 loc) · 1.29 KB
/
docker-compose-sql-sync.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
###############################################################################
# Author: [email protected] #
###############################################################################
# 初次启动时使用,通过schema:sync完成建表,后续开发过程中无需执行
version: '3.7'
services:
base_image:
build: .
image: cicada_ci:dev
dev_mysql:
image: mysql:5.7
command:
[
'mysqld',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_general_ci',
]
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_PASSWORD: 123456
MYSQL_DATABASE: db_feci_open
volumes:
- ./.docker/mysql_data:/var/lib/mysql
dev_mysql_adminer:
image: adminer
restart: always
ports:
- 8080:8080
dev_webserver:
image: cicada_ci:dev
command:
['/bin/bash', '-c', 'cd webserver && npm run typeorm:cli -- schema:sync']
ports:
- 3600:3600
depends_on:
- base_image
- dev_mysql
environment:
DATABASE_HOST: dev_mysql
DATABASE_PORT: 3306
DATABASE_USERNAME: root
DATABASE_PASSWORD: 123456
DATABASE_NAME: db_feci_open
volumes:
- ./webserver/src:/usr/app/webserver/src
restart: on-failure