Skip to content

Instantly share code, notes, and snippets.

@vhr
Created April 28, 2017 15:11
Show Gist options
  • Save vhr/745e1376fe8b5194ebc6c2cae59a84fb to your computer and use it in GitHub Desktop.
Save vhr/745e1376fe8b5194ebc6c2cae59a84fb to your computer and use it in GitHub Desktop.
Docker compose MySQL and phpMyAdmin containers
version: '2'
services:
mysql:
image: mysql:5
volumes:
- ./mysql:/var/lib/mysql
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123
MYSQL_DATABASE: schedule
MYSQL_USER: test
MYSQL_PASSWORD: 123
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
ports:
- "8080:80"
depends_on:
- mysql
depends_on:
- mysql
environment:
MYSQL_ROOT_PASSWORD: 123
PMA_HOST: mysql
PMA_USER: root
PMA_PASSWORD: 123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment