Skip to content

Instantly share code, notes, and snippets.

@lfx
Created October 3, 2016 16:57
Show Gist options
  • Save lfx/ea35d616c84dbbbbf0c8fe1b95b6131e to your computer and use it in GitHub Desktop.
Save lfx/ea35d616c84dbbbbf0c8fe1b95b6131e to your computer and use it in GitHub Desktop.
WP + MariaDB + NGINX + phpMyAdmin + Mailhog
version: "2"
services:
mariadb:
image: wodby/wordpress-mariadb
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # The simple way to override the mariadb config.
volumes:
- ./docker-runtime/mariadb:/var/lib/mysql
# - ./docker-runtime/mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
php:
image: wodby/wordpress-php
environment:
PHP_SITE_NAME: dev
PHP_HOST_NAME: localhost:8000
# PHP_DOCROOT: public # Relative path inside the /var/www/html/ directory.
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_XDEBUG_ENABLED: 0 # Set 1 to enable.
volumes:
- ./:/var/www/html
nginx:
image: wodby/wordpress-nginx
environment:
NGINX_SERVER_NAME: localhost
NGINX_UPSTREAM_NAME: php
# NGINX_DOCROOT: public # Relative path inside the /var/www/html/ directory.
volumes_from:
- php
ports:
- "8000:80"
pma:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
PMA_USER: wordpress
PMA_PASSWORD: wordpress
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
ports:
- "8001:80"
mailhog:
image: mailhog/mailhog
ports:
- "8002:8025"
# redis:
# image: redis:3.2-alpine
# memcached:
# image: memcached:1.4-alpine
# solr:
# image: solr:5.5-alpine
# volumes:
# - ./docker-runtime/solr:/opt/solr/server/solr/mycores
# ports:
# - "8003:8983"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment