Skip to content

Instantly share code, notes, and snippets.

@Servuc
Last active October 4, 2019 14:38
Show Gist options
  • Save Servuc/ef3f40130a404847ad2c16ed8887530d to your computer and use it in GitHub Desktop.
Save Servuc/ef3f40130a404847ad2c16ed8887530d to your computer and use it in GitHub Desktop.
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