From a629d1cc6ca4a88ef537f114efe3ec68050da3bf Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 2 Jul 2022 22:52:38 +0000 Subject: [PATCH] Build/Test Tools: Enable loopback requests to work on the local development environment. This maps `localhost` to the host machine so the requests get routed to the web server container. Props sandrasanzdev, hasanuzzamanshamim Fixes #52708 git-svn-id: https://develop.svn.wordpress.org/trunk@53636 602fd350-edb4-49c9-b593-d223f7449a82 --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 0ea37a4c95..6fcbe4d1f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,9 @@ services: # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. init: true + extra_hosts: + - localhost:host-gateway + ## # The MySQL container. ## @@ -98,6 +101,9 @@ services: # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. init: true + extra_hosts: + - localhost:host-gateway + volumes: # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume. mysql: {}