Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Teach Docker-compose - TP1
version: '2'
services:
mysql:
image: mysql
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
MYSQL_ROOT_PASSWORD: dbrootpassword
MYSQL_DATABASE: dbdatabase
volumes:
- ./data/db:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
ports:
- '8080:80'
ports:
- '8080:80'
version: '3'
services:
mysql:
image: mysql
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
MYSQL_ROOT_PASSWORD: dbrootpassword
MYSQL_DATABASE: dbdatabase
volumes:
- mysql-data:/var/lib/mysql
networks:
- mysql-network
phpmyadmin:
image: phpmyadmin/phpmyadmin
networks:
- mysql-network
environment:
PMA_HOST: mysql
PMA_PORT: 3306
ports:
- '8080:80'
networks:
- mysql-network
networks:
mysql-network:
volumes:
mysql-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.