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
This commit is contained in:
John Blackbourn 2022-07-02 22:52:38 +00:00
parent 242f2b0128
commit a629d1cc6c

View File

@ -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: {}