-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDocker-Compose.yaml
43 lines (41 loc) · 1.23 KB
/
Docker-Compose.yaml
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
services:
mysql:
image: mysql:8.3.0
hostname: mysql-8.3.0-bbt3104-lab1
container_name: mysql-8.3.0-bbt3104-lab1
restart: always
ports:
- 3307:3306
environment:
MYSQL_ROOT_PASSWORD: 5trathm0re
volumes:
# To store the configuration file
- ./container-volumes/mysql/etc-mysql/my.cnf:/etc/mysql/my.cnf
# To store the data persistently
- ./container-volumes/mysql/var-lib-mysql:/var/lib/mysql
# To run the SQL scripts used to create the required databases
- ./container-volumes/mysql/init-scripts:/docker-entrypoint-initdb.d/
command: >
/bin/bash -c "
chmod 644 /etc/mysql/my.cnf &&
docker-entrypoint.sh mysqld
"
phpmyadmin:
image: phpmyadmin:5.2.1
hostname: phpmyadmin-5.2.1-bbt3104
container_name: phpmyadmin-5.2.1-bbt3104
restart: always
ports:
- 8080:80
environment:
- MYSQL_ROOT_PASSWORD=5trathm0re
- MYSQL_USER=student
- MYSQL_PASSWORD=5trathm0re
- PMA_HOST=mysql-8.3.0-bbt3104
- PMA_PORT=3306
- PMA_USER=root
- PMA_PASSWORD=5trathm0re
volumes:
- ./container-volumes/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
depends_on:
- mysql