Skip to content

Instantly share code, notes, and snippets.

@cleytonferrari
Created April 13, 2017 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleytonferrari/098a3aed2d86cc82b4454406a055e718 to your computer and use it in GitHub Desktop.
Save cleytonferrari/098a3aed2d86cc82b4454406a055e718 to your computer and use it in GitHub Desktop.
Exemplo de compose php, mysql, phpmyadmin
# http://www.phprs.com.br/2016/05/criando-um-ambiente-de-desenvolvimento-php-com-docker-compose/
# http://yutaf.github.io/run-phpmyadmin-in-docker-compose/
# uso:
# php http://localhost/
# phpMyAdmin http://localhost:8080/
php:
build: ../
ports:
- "80:80"
- "443:443"
volumes:
- ../www:/var/www/html
links:
- db
db:
image: mysql:5.7
volumes:
- /var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=phprs
- MYSQL_DATABASE=phprs
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
ports:
- '8080:80'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment