Skip to content

Instantly share code, notes, and snippets.

@tofumatt
Last active January 22, 2020 13:00
Show Gist options
  • Save tofumatt/932e66e84020a9524a31d82352100a8f to your computer and use it in GitHub Desktop.
Save tofumatt/932e66e84020a9524a31d82352100a8f to your computer and use it in GitHub Desktop.
Google Site Kit 10updocker compose file
---
# Use this file as your `docker-compose.yml` if you set up a 10updocker local WordPress site to
# run Site Kit's WordPress site (recommended; see: https://10up.github.io/wp-local-docker-docs/)
# `$ABSOLUTE_PATH_TO_SITE_KIT_REPO` should be replaced with something like `/Users/$YOUR_USER/Projects/site-kit-wp`
version: '3'
services:
memcached:
image: 'memcached:latest'
nginx:
image: 'nginx:latest'
expose:
- '80'
- '443'
volumes:
- './wordpress:/var/www/html:cached'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO:/var/www/html/wp-content/plugins/google-site-kit'
- './config/nginx/default.conf:/etc/nginx/conf.d/default.conf:cached'
depends_on:
- phpfpm
- memcacheadmin
networks:
- default
- wplocaldocker
environment:
CERT_NAME: localhost
HTTPS_METHOD: noredirect
VIRTUAL_HOST: 'googlekitlocal.10uplabs.com,site-kit-wp.test,*.googlekitlocal.10uplabs.com,*.site-kit-wp.test'
memcacheadmin:
image: hitwe/phpmemcachedadmin
expose:
- '80'
depends_on:
- memcached
phpfpm:
image: '10up/phpfpm:7.3'
volumes:
- './wordpress:/var/www/html:cached'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO:/var/www/html/wp-content/plugins/google-site-kit'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/mu-plugins:/var/www/html/wp-content/mu-plugins'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/analytics-existing-tag.php:/var/www/html/wp-content/plugins/analytics-existing-tag.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/admin-bar-visibility.php:/var/www/html/wp-content/plugins/admin-bar-visibility.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/auth.php:/var/www/html/wp-content/plugins/auth.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/module-setup-analytics.php:/var/www/html/wp-content/plugins/module-setup-analytics.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/module-setup-tagmanager.php:/var/www/html/wp-content/plugins/module-setup-tagmanager.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/oauth-callback.php:/var/www/html/wp-content/plugins/oauth-callback.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/site-verification-api-mock.php:/var/www/html/wp-content/plugins/site-verification-api-mock.php'
- '$ABSOLUTE_PATH_TO_SITE_KIT_REPO/tests/e2e/plugins/site-verification.php:/var/www/html/wp-content/plugins/site-verification.php'
- './config/php-fpm/php.ini:/usr/local/etc/php/php.ini:cached'
- './config/php-fpm/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:cached'
- 'wplocaldockerCache:/var/www/.wp-cli/cache:cached'
- '~/.ssh:/root/.ssh:cached'
- './config/php-fpm/wp-cli.local.yml:/var/www/.wp-cli/config.yml:cached'
depends_on:
- memcached
- elasticsearch
networks:
- default
- wplocaldocker
dns:
- 10.0.0.2
elasticsearch:
image: 'docker.elastic.co/elasticsearch/elasticsearch:5.6.5'
expose:
- '9200'
volumes:
- './config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached'
- './config/elasticsearch/plugins:/usr/share/elasticsearch/plugins:cached'
- 'elasticsearchData:/usr/share/elasticsearch/data:delegated'
environment:
ES_JAVA_OPTS: '-Xms750m -Xmx750m'
networks:
wplocaldocker:
external:
name: wplocaldocker
volumes:
wplocaldockerCache:
external:
name: wplocaldockerCache
elasticsearchData: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment