82d7870fe4
This commit adds the first iteration of a Docker-based config for setting up a local WordPress development environment. Props pento, noisysocks, mcsf, pbearne, isabel_brison. See #47767. git-svn-id: https://develop.svn.wordpress.org/trunk@45745 602fd350-edb4-49c9-b593-d223f7449a82
49 lines
1022 B
YAML
49 lines
1022 B
YAML
version: '3.7'
|
|
|
|
services:
|
|
|
|
##
|
|
# The WP CLI container.
|
|
##
|
|
cli:
|
|
image: wordpressdevelop/cli:${LOCAL_PHP-latest}
|
|
|
|
networks:
|
|
- wpdevnet
|
|
|
|
environment:
|
|
LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
|
|
|
|
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:
|
|
image: wordpressdevelop/phpunit:${LOCAL_PHP-latest}
|
|
|
|
networks:
|
|
- wpdevnet
|
|
|
|
environment:
|
|
LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
|
|
|
|
volumes:
|
|
- ./phpunit-config.ini:/usr/local/etc/php/conf.d/phpunit-config.ini
|
|
- ../../:/wordpress-develop
|
|
- phpunit-uploads:/wordpress-develop/${LOCAL_DIR-src}/wp-content/uploads
|
|
|
|
# The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
|
|
init: true
|
|
|
|
depends_on:
|
|
- mysql
|
|
|
|
volumes:
|
|
# Using a volume for the uploads directory improves PHPUnit performance.
|
|
phpunit-uploads: {}
|