-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (55 loc) · 1.39 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
version: '2.1'
services:
web_nginx:
build: '.'
container_name: web_nginx
volumes:
- ./nginx/www:/var/www
ports:
- 443:443
- 80:80
restart: always
depends_on:
- web_mysql
links:
- web_mysql
web_mysql:
image: mysql:5.7
container_name: web_mysql
ports:
- 3306:3306
volumes:
- ./mysql/init:/docker-entrypoint-initdb.d
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
environment:
MYSQL_DATABASE: web_db
MYSQL_USER: web_user
MYSQL_PASSWORD: web_password
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
hostname: mysql
restart: always
test_web_mysql:
image: mysql:5.7
container_name: test_web_mysql
ports:
- 3307:3306
volumes:
- ./mysql/init:/docker-entrypoint-initdb.d
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
environment:
MYSQL_DATABASE: test_db
MYSQL_USER: test_user
MYSQL_PASSWORD: test_password
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
hostname: test_mysql
restart: always
phpmyadmin:
image: phpmyadmin/phpmyadmin
depends_on:
- web_mysql
environment:
- PMA_ARBITRARY=1
- PMA_HOSTS=mysql
- PMA_USER=root
ports:
- '8080:80'