Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "WordPress Core Development",
"dockerComposeFile": "docker-compose.yml",
"dockerComposeFile": "compose.yml",
"service": "app",
"workspaceFolder": "/workspace",

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Local Docker Environment
name: Local Development Environment

on:
push:
Expand All @@ -9,7 +9,7 @@ on:
paths:
# Any changes to Docker related files.
- '.env.example'
- 'docker-compose.yml'
- 'compose.yml'
# Any changes to local environment related files
- 'tools/local-env/**'
# These files configure npm and the task runner. Changes could affect the outcome.
Expand All @@ -22,9 +22,9 @@ on:
# These files define the versions to test.
- '.version-support-*.json'
# Changes to this and related workflow files should always be verified.
- '.github/workflows/local-docker-environment.yml'
- '.github/workflows/local-development-environment.yml'
- '.github/workflows/reusable-support-json-reader-v1.yml'
- '.github/workflows/reusable-test-docker-environment-v1.yml'
- '.github/workflows/reusable-test-local-development-environment-v1.yml'
pull_request:
branches:
- trunk
Expand All @@ -33,7 +33,7 @@ on:
paths:
# Any changes to Docker related files.
- '.env.example'
- 'docker-compose.yml'
- 'compose.yml'
# Any changes to local environment related files
- 'tools/local-env/**'
# These files configure npm and the task runner. Changes could affect the outcome.
Expand All @@ -46,9 +46,9 @@ on:
# These files define the versions to test.
- '.version-support-*.json'
# Changes to this and related workflow files should always be verified.
- '.github/workflows/local-docker-environment.yml'
- '.github/workflows/local-development-environment.yml'
- '.github/workflows/reusable-support-json-reader-v1.yml'
- '.github/workflows/reusable-test-docker-environment-v1.yml'
- '.github/workflows/reusable-test-local-development-environment-v1.yml'
workflow_dispatch:

# Cancels all previous workflow runs for pull requests that have not completed.
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# Tests the local Docker environment.
environment-tests-mysql:
name: PHP ${{ matrix.php }}
uses: ./.github/workflows/reusable-test-local-docker-environment-v1.yml
uses: ./.github/workflows/reusable-test-local-development-environment-v1.yml
permissions:
contents: read
needs: [ build-test-matrix ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This workflow is used by `trunk` and branches >= 6.8.
##
name: Test local Docker environment
name: Test Local Development Environment

on:
workflow_call:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
paths:
- '.github/workflows/test-coverage.yml'
- '.github/workflows/reusable-phpunit-tests-v3.yml'
- 'docker-compose.yml'
- 'compose.yml'
- 'phpunit.xml.dist'
- 'tests/phpunit/multisite.xml'
pull_request:
Expand All @@ -17,7 +17,7 @@ on:
paths:
- '.github/workflows/test-coverage.yml'
- '.github/workflows/reusable-phpunit-tests-v3.yml'
- 'docker-compose.yml'
- 'compose.yml'
- 'phpunit.xml.dist'
- 'tests/phpunit/multisite.xml'
# Once daily at 00:00 UTC.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ wp-tests-config.php

# Files for local environment config
/docker-compose.override.yml
# The compose.override.yml is the new preferred Compose file name.
/compose.override.yml

# Visual regression test diffs
tests/visual-regression/specs/__snapshots__
10 changes: 5 additions & 5 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
# The web server container.
##
wordpress-develop:
image: nginx:alpine
image: docker.io/nginx:alpine

networks:
- wpdevnet
Expand Down Expand Up @@ -32,7 +32,7 @@ services:
# The PHP container.
##
php:
image: wordpressdevelop/php:${LOCAL_PHP-latest}
image: docker.io/wordpressdevelop/php:${LOCAL_PHP-latest}

networks:
- wpdevnet
Expand Down Expand Up @@ -64,7 +64,7 @@ services:
# The MySQL container.
##
mysql:
image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
image: docker.io/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}

networks:
- wpdevnet
Expand Down Expand Up @@ -95,7 +95,7 @@ services:
# The WP CLI container.
##
cli:
image: wordpressdevelop/cli:${LOCAL_PHP-latest}
image: docker.io/wordpressdevelop/cli:${LOCAL_PHP-latest}

networks:
- wpdevnet
Expand Down Expand Up @@ -130,7 +130,7 @@ services:
# The Memcached container.
##
memcached:
image: memcached
image: docker.io/memcached:latest

networks:
- wpdevnet
Expand Down
8 changes: 4 additions & 4 deletions tools/local-env/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ const local_env_utils = {
* Determines which Docker compose files are required to properly configure the local environment given the
* specified PHP version, database type, and database version.
*
* By default, only the standard docker-compose.yml file will be used.
* By default, only the standard compose.yml file will be used.
*
* When PHP 7.2 or 7.3 is used in combination with MySQL 8.4, an override file will also be returned to ensure
* that the mysql_native_password plugin authentication plugin is on and available for use.
*
* @return {string[]} Compose files.
*/
get_compose_files: function() {
const composeFiles = [ 'docker-compose.yml' ];
const composeFiles = [ 'compose.yml' ];

if ( existsSync( 'docker-compose.override.yml' ) ) {
composeFiles.push( 'docker-compose.override.yml' );
if ( existsSync( 'compose.override.yml' ) ) {
composeFiles.push( 'compose.override.yml' );
}

if ( process.env.LOCAL_DB_TYPE !== 'mysql' ) {
Expand Down
Loading