Docker compose for mysql
parent
71f24de0ab
commit
3acd240518
|
@ -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
|
|
@ -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:
|
Loading…
Reference in New Issue