Created
October 22, 2019 17:55
-
-
Save leonardobiffi/90e5ae93f712ed842cf734ce43d6cd2e to your computer and use it in GitHub Desktop.
Docker Compose LAMP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
web: | |
image: php:7.2-apache | |
ports: | |
- "80:80" | |
volumes: | |
- ./app:/var/www/html | |
links: | |
- mysql | |
restart: always | |
mysql: | |
image: mysql:5.7 | |
container_name: 'mysql' | |
restart: 'always' | |
ports: | |
- "3306:3306" | |
volumes: | |
- ./mysql/dump:/docker-entrypoint-initdb.d | |
- persistent:/var/lib/mysql | |
- ./mysql/data:/var/lib/mysql | |
- ./mysql/logs:/var/log/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: 081264 | |
MYSQL_DATABASE: database | |
MYSQL_USER: user | |
MYSQL_PASSWORD: 1segredo | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
container_name: 'phpmyadmin' | |
links: | |
- mysql | |
environment: | |
PMA_HOST: mysql | |
PMA_PORT: 3306 | |
PMA_USER: user | |
PMA_PASSWORD: 1segredo | |
MYSQL_ROOT_PASSWORD: 081264 | |
MYSQL_USER: user | |
MYSQL_PASSWORD: 1segredo | |
ports: | |
- '9090:80' | |
volumes: | |
- /sessions | |
volumes: | |
persistent: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment