Skip to content

Commit cddeb1e

Browse files
committed
docker mysql phpmyadmin
0 parents  commit cddeb1e

File tree

5 files changed

+69
-0
lines changed

5 files changed

+69
-0
lines changed

.env.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DB_ROOT_PASSWORD=#123Mudar#
2+
DB_USER=docker
3+
DB_PASSWORD=docker

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
./mysqlData/*

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# docker-compose MySQL + phpmyadmin
2+
3+
4+
5+
![banner](./media/banner.png)
6+
7+
8+
Its a docker-compose dev environment that create a MySql 5.7 server
9+
10+
## Steps
11+
1. Rename the file .env.sample to .env
12+
2. Change the variables values from the file .env
13+
3. deploy
14+
15+
## Deploy
16+
```shell
17+
docker-compose up -d
18+
```
19+
20+
## Exposed ports
21+
```shell
22+
PORT SERVICE
23+
3306/tcp - mySql
24+
80/tpc - phpMyAdmin
25+
```
26+
27+
## Default
28+
```shell
29+
username: root
30+
password: #123Mudar#
31+
```

docker-compose.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: '2'
2+
3+
services:
4+
mysql:
5+
container_name: mysqlserver-dev
6+
restart: always
7+
image: mysql:5.7
8+
environment:
9+
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
10+
MYSQL_USER: ${DB_USER}
11+
MYSQL_PASS: ${DB_PASSWORD}
12+
ports:
13+
- '3306:3306'
14+
volumes:
15+
- ./mysqlData:/var/lib/mysql
16+
networks:
17+
- vlan_database
18+
19+
pma:
20+
image: phpmyadmin/phpmyadmin
21+
container_name: phpMyAdmin-dev
22+
environment:
23+
PMA_HOST: 'mysql'
24+
PMA_PORT: 3306
25+
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
26+
ports:
27+
- 80:80
28+
networks:
29+
- vlan_database
30+
31+
networks:
32+
vlan_database:
33+

media/banner.png

26.4 KB
Loading

0 commit comments

Comments
 (0)