-
Notifications
You must be signed in to change notification settings - Fork 98
/
docker-compose.yml
45 lines (43 loc) · 1.1 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
version: '3'
services:
mysql:
image: mysql:5.7.27
container_name: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
TZ: Asia/Shanghai
DATABASES:
${MYSQL_DBNAME}
entrypoint:
bash -c "DBs=($${DATABASES//,/ });
for db in $${DBs[@]};
do
echo "'"CREATE DATABASE IF NOT EXISTS $$db;"'" >> /docker-entrypoint-initdb.d/create_databases.sql;
done;
docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
"
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
ports:
- '3306:3306'
volumes:
- '/usr/local/mysql:/var/lib/mysql'
- ./deploy/mysql/init:/docker-entrypoint-initdb.d
- ./deploy/mysql/conf.d:/etc/mysql/conf.d
networks:
- app-network
eolinker:
image: airplayx/eolinker
container_name: eolinker
restart: unless-stopped
ports:
- '80:80'
networks:
- app-network
networks:
app-network:
driver: bridge