Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bellflower2015/ade10900b3062692d9ec0b7ce6560631 to your computer and use it in GitHub Desktop.
Save bellflower2015/ade10900b3062692d9ec0b7ce6560631 to your computer and use it in GitHub Desktop.
docker-compose.yml (nginx/php/mysql/phpmyadmin)
version: '2'
services:
# mysql
mysql:
container_name: "mysql"
image: mysql:5.7
ports:
- '3306:3306' #デバッグ用
environment:
MYSQL_ROOT_PASSWORD: root
# nginx
nginx:
container_name: "nginx"
image: nginx:1.15.1
links:
- mysql
- php
# php
php:
container_name: "php"
image: php:7.2-apache
ports:
- '80:80'
volumes:
- ./html:/var/www/html
links:
- mysql
#phpmyadmin
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_ARBITRARY=1
- PMA_HOST=mysql
- PMA_USER=root
- PMA_PASSWORD=root
links:
- mysql
ports:
- 8080:80
volumes:
- ./phpmyadmin/sessions:/sessions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment