Ticket #47767: 47767.2.patch
File 47767.2.patch, 2.7 KB (added by , 6 years ago) |
---|
-
tools/local-env/default.template
3 3 4 4 listen 80 default_server; 5 5 listen [::]:80 default_server; 6 listen ${LOCAL_PORT} default_server; 7 listen [::]:${LOCAL_PORT} default_server; 6 8 7 server_name localhost;9 server_name ${LOCAL_URL}; 8 10 9 11 client_max_body_size 1g; 10 12 -
docker-compose.yml
9 9 image: nginx:alpine 10 10 11 11 networks: 12 - wpdevnet 12 wpdevnet: 13 aliases: 14 - ${LOCAL_URL-wpdir.localhost} 13 15 14 16 ports: 15 17 - ${LOCAL_PORT-8889}:80 16 18 17 19 environment: 18 20 LOCAL_DIR: ${LOCAL_DIR-src} 21 LOCAL_PORT: ${LOCAL_PORT-8889} 22 LOCAL_URL: ${LOCAL_URL-wpdev.localhost} 19 23 20 24 volumes: 21 25 - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template 22 26 - ./:/var/www 23 27 24 # Load our config file, substitu ning environment variables into the config.25 command: /bin/sh -c "envsubst '$$LOCAL_DIR ' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"28 # Load our config file, substituting environment variables into the config. 29 command: /bin/sh -c "envsubst '$$LOCAL_DIR,$$LOCAL_URL,$$LOCAL_PORT' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" 26 30 27 31 depends_on: 28 32 - php -
.env
1 1 ## 2 2 # Default configuration options for the local dev environment. 3 3 # 4 # All of these options can be overrid en by setting them as environment variables before starting4 # All of these options can be overridden by setting them as environment variables before starting 5 5 # the environment. You will need to restart your environment when changing any of these. 6 6 ## 7 7 8 # The site will be available at http://localhost:LOCAL_PORT 8 # The site will be available at http://LOCAL_URL:LOCAL_PORT 9 # Note that the use of 'localhost' as the URL will work, but loopback features will not be available. 10 LOCAL_URL=wpdev.localhost 9 11 LOCAL_PORT=8889 10 12 11 13 # Where to run WordPress from. Valid options are 'src' and 'build'. … … 31 33 LOCAL_SCRIPT_DEBUG=true 32 34 33 35 # The URL to use when running e2e tests. 34 WP_BASE_URL=http:// localhost:${LOCAL_PORT}36 WP_BASE_URL=http://${LOCAL_URL}:${LOCAL_PORT}