Created
March 28, 2017 17:20
-
-
Save benjaminpick/99d30cfa2be6a5b711ff8c1d5844f3c8 to your computer and use it in GitHub Desktop.
PHP / MySQL combo
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
server: | |
mem_limit: 301m | |
image: webgriffe/docker-php-apache-base:latest | |
links: | |
- wordpress_db | |
ports: | |
- "80:80" | |
volumes: | |
- .:/var/www/html | |
environment: | |
APACHE_DOC_ROOT: /var/www/html | |
APACHE_DOC_ROOT_ALIAS: /local | |
SSMTP_MAILHUB: smtp.server.com | |
SSMTP_AUTH_USER: ------- | |
SSMTP_AUTH_PASS: ------ | |
SSMTP_USE_STARTTLS: 'yes' | |
mariadb-data: | |
image: tianon/true | |
volumes: | |
- /var/lib/mysql | |
wordpress_db: | |
mem_limit: 300m | |
image: mariadb | |
volumes_from: | |
- "mariadb-data" | |
environment: | |
MYSQL_DATABASE: database | |
MYSQL_USER: database | |
MYSQL_PASSWORD: password | |
MYSQL_ROOT_PASSWORD: password2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning: If you do a
docker-compose pull
, it will delete the data of the database. Instead, usedocker-compose pull server
ordocker-compose pull wordpress_db
to only update these images without the data.