Docker compose for mysql

main
Marc Gauch 2022-09-23 14:56:15 +02:00
parent 71f24de0ab
commit 3acd240518
2 changed files with 40 additions and 0 deletions

11
phpmyadmin/README.md Normal file
View File

@ -0,0 +1,11 @@
run me with:
```bash
docker-compose -f phpmyadmin.yml up
```
then go to http://localhost:8081 and sign in with
database: db
username: root
password: 1234
Then go to http://localhost:8081/index.php?route=/server/sql and paste the sql commands

29
phpmyadmin/phpmyadmin.yml Normal file
View File

@ -0,0 +1,29 @@
version: '3'
services:
db:
image: mysql:5.7
container_name: db
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: database
MYSQL_USER: user
MYSQL_PASSWORD: 1234
ports:
- "6033:3306"
volumes:
- dbdata:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: pma
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_ARBITRARY: 1
restart: always
ports:
- 8081:80
volumes:
dbdata: