Created
June 18, 2018 13:40
-
-
Save timogoosen/3ca26af91c3558190b6653a34e0fed3b to your computer and use it in GitHub Desktop.
docker-compose.yml for wordpress + elasticsearch config
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: "2" | |
services: | |
mariadb: | |
image: wodby/mariadb:$MARIADB_TAG | |
container_name: "${PROJECT_NAME}_mariadb" | |
stop_grace_period: 30s | |
environment: | |
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD | |
MYSQL_DATABASE: $DB_NAME | |
MYSQL_USER: $DB_USER | |
MYSQL_PASSWORD: $DB_PASSWORD | |
volumes: | |
- /Users/timo/Desktop/container-volumes/mariadb:/var/lib/mysql # I want to manage volumes manually. | |
php: | |
image: wodby/wordpress-php:$PHP_TAG | |
container_name: "${PROJECT_NAME}_php" | |
environment: | |
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025 | |
DB_HOST: $DB_HOST | |
DB_USER: $DB_USER | |
DB_PASSWORD: $DB_PASSWORD | |
DB_NAME: $DB_NAME | |
## Read instructions at https://wodby.com/stacks/wordpress/docs/local/xdebug/ | |
# PHP_XDEBUG: 1 | |
# PHP_XDEBUG_DEFAULT_ENABLE: 1 | |
# PHP_XDEBUG_REMOTE_CONNECT_BACK: 0 | |
# PHP_IDE_CONFIG: serverName=my-ide | |
# PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux | |
# PHP_XDEBUG_REMOTE_HOST: 10.254.254.254 # macOS | |
# PHP_XDEBUG_REMOTE_HOST: 10.0.75.1 # Windows | |
volumes: | |
- ./:/var/www/html | |
## For macOS users (https://wodby.com/stacks/wordpress/docs/local/docker-for-mac/) | |
# - ./:/var/www/html:cached # User-guided caching | |
# - docker-sync:/var/www/html # Docker-sync | |
## For Xdebug profiler files | |
# - files:/mnt/files | |
nginx: | |
image: wodby/wordpress-nginx:$NGINX_TAG | |
container_name: "${PROJECT_NAME}_nginx" | |
depends_on: | |
- php | |
environment: | |
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off" | |
NGINX_ERROR_LOG_LEVEL: debug | |
NGINX_BACKEND_HOST: php | |
volumes: | |
- ./:/var/www/html | |
labels: | |
- 'traefik.backend=nginx' | |
- 'traefik.port=80' | |
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}' | |
mailhog: | |
image: mailhog/mailhog | |
container_name: "${PROJECT_NAME}_mailhog" | |
labels: | |
- 'traefik.backend=mailhog' | |
- 'traefik.port=8025' | |
- 'traefik.frontend.rule=Host:mailhog.${PROJECT_BASE_URL}' | |
elasticsearch: | |
image: wodby/elasticsearch:$ELASTICSEARCH_TAG | |
environment: | |
ES_JAVA_OPTS: "-Xms500m -Xmx500m" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
portainer: | |
image: portainer/portainer | |
container_name: "${PROJECT_NAME}_portainer" | |
command: --no-auth -H unix:///var/run/docker.sock | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
labels: | |
- 'traefik.backend=portainer' | |
- 'traefik.port=9000' | |
- 'traefik.frontend.rule=Host:portainer.${PROJECT_BASE_URL}' | |
traefik: | |
image: traefik | |
container_name: "${PROJECT_NAME}_traefik" | |
command: -c /dev/null --web --docker --logLevel=INFO | |
ports: | |
- '8000:80' | |
# - '8080:8080' # Dashboard | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
#volumes: | |
## Docker-sync for macOS users | |
# docker-sync: | |
# external: true | |
## For Xdebug profiler | |
# files: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment