2019-08-12 09:20:06 +00:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
##
|
|
|
|
# The web server container.
|
|
|
|
##
|
|
|
|
wordpress-develop:
|
|
|
|
image: nginx:alpine
|
|
|
|
|
|
|
|
networks:
|
|
|
|
- wpdevnet
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- ${LOCAL_PORT-8889}:80
|
|
|
|
|
|
|
|
environment:
|
|
|
|
LOCAL_DIR: ${LOCAL_DIR-src}
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- ./tools/local-env/default.template:/etc/nginx/conf.d/default.template
|
|
|
|
- ./:/var/www
|
|
|
|
|
2020-06-04 16:51:32 +00:00
|
|
|
# Load our config file, substituting environment variables into the config.
|
2019-08-12 09:20:06 +00:00
|
|
|
command: /bin/sh -c "envsubst '$$LOCAL_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- php
|
|
|
|
|
|
|
|
##
|
|
|
|
# The PHP container.
|
|
|
|
##
|
|
|
|
php:
|
|
|
|
image: wordpressdevelop/php:${LOCAL_PHP-latest}
|
|
|
|
|
|
|
|
networks:
|
|
|
|
- wpdevnet
|
|
|
|
|
|
|
|
environment:
|
|
|
|
LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
|
|
|
|
LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
|
2019-09-26 04:57:38 +00:00
|
|
|
PHP_FPM_UID: ${PHP_FPM_UID-1000}
|
|
|
|
PHP_FPM_GID: ${PHP_FPM_GID-1000}
|
2019-08-12 09:20:06 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
|
|
|
|
- ./:/var/www
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
|
|
|
|
##
|
|
|
|
# The MySQL container.
|
|
|
|
##
|
|
|
|
mysql:
|
Build/Test Tools: Backport updates to GitHub Actions.
This backports several changesets to GitHub Actions workflows. These changesets:
- address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
- adds support for automatically retrying a failed workflow once.
- removes workflow files that are not applicable to the branch.
- backports some Docker environment related tooling updates for the sake of consistency across branches.
Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.8 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.
git-svn-id: https://develop.svn.wordpress.org/branches/5.7@55518 602fd350-edb4-49c9-b593-d223f7449a82
2023-03-10 16:07:44 +00:00
|
|
|
image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
|
2019-08-12 09:20:06 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
- wpdevnet
|
|
|
|
|
2020-02-09 21:20:25 +00:00
|
|
|
ports:
|
|
|
|
- "3306"
|
|
|
|
|
2019-08-12 09:20:06 +00:00
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: password
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- ./tools/local-env/mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql
|
|
|
|
- mysql:/var/lib/mysql
|
|
|
|
|
|
|
|
# For compatibility with PHP versions that don't support the caching_sha2_password auth plugin used in MySQL 8.0.
|
|
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
|
|
|
|
|
|
##
|
|
|
|
# The WP CLI container.
|
|
|
|
##
|
|
|
|
cli:
|
|
|
|
image: wordpressdevelop/cli:${LOCAL_PHP-latest}
|
|
|
|
|
|
|
|
networks:
|
|
|
|
- wpdevnet
|
|
|
|
|
|
|
|
environment:
|
|
|
|
LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
|
|
|
|
LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
|
2019-09-26 04:57:38 +00:00
|
|
|
PHP_FPM_UID: ${PHP_FPM_UID-1000}
|
|
|
|
PHP_FPM_GID: ${PHP_FPM_GID-1000}
|
2019-08-12 09:20:06 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- ./:/var/www
|
|
|
|
|
|
|
|
# The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
|
|
|
|
init: true
|
|
|
|
|
|
|
|
##
|
|
|
|
# The PHPUnit container.
|
|
|
|
##
|
|
|
|
phpunit:
|
2020-10-28 23:15:07 +00:00
|
|
|
image: wordpressdevelop/phpunit:${LOCAL_PHPUNIT-latest}
|
2019-08-12 09:20:06 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
- wpdevnet
|
|
|
|
|
|
|
|
environment:
|
|
|
|
LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
|
|
|
|
LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
|
2019-08-23 01:55:28 +00:00
|
|
|
LOCAL_DIR: ${LOCAL_DIR-src}
|
2019-08-15 00:33:32 +00:00
|
|
|
WP_MULTISITE: ${WP_MULTISITE-false}
|
2019-09-26 04:57:38 +00:00
|
|
|
PHP_FPM_UID: ${PHP_FPM_UID-1000}
|
|
|
|
PHP_FPM_GID: ${PHP_FPM_GID-1000}
|
2019-12-20 00:01:33 +00:00
|
|
|
TRAVIS_BRANCH: ${TRAVIS_BRANCH-false}
|
|
|
|
TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false}
|
2020-10-21 19:55:17 +00:00
|
|
|
GITHUB_REF: ${GITHUB_REF-false}
|
|
|
|
GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME-false}
|
2019-08-12 09:20:06 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- ./tools/local-env/phpunit-config.ini:/usr/local/etc/php/conf.d/phpunit-config.ini
|
2019-08-15 00:33:32 +00:00
|
|
|
- ./:/var/www
|
|
|
|
- phpunit-uploads:/var/www/${LOCAL_DIR-src}/wp-content/uploads
|
2019-08-12 09:20:06 +00:00
|
|
|
|
|
|
|
# The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
|
|
|
|
init: true
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume.
|
|
|
|
mysql: {}
|
|
|
|
# Using a volume for the uploads directory improves PHPUnit performance.
|
|
|
|
phpunit-uploads: {}
|
|
|
|
|
|
|
|
networks:
|
|
|
|
# Creating our own network allows us to connect between containers using their service name.
|
|
|
|
wpdevnet:
|
|
|
|
driver: bridge
|