Make WordPress Core

Ticket #47767: 47767.2.patch

File 47767.2.patch, 2.7 KB (added by Clorith, 6 years ago)
  • tools/local-env/default.template

     
    33
    44        listen 80 default_server;
    55        listen [::]:80 default_server;
     6        listen ${LOCAL_PORT} default_server;
     7        listen [::]:${LOCAL_PORT} default_server;
    68
    7         server_name localhost;
     9        server_name ${LOCAL_URL};
    810
    911        client_max_body_size 1g;
    1012
  • docker-compose.yml

     
    99    image: nginx:alpine
    1010
    1111    networks:
    12       - wpdevnet
     12      wpdevnet:
     13        aliases:
     14          - ${LOCAL_URL-wpdir.localhost}
    1315
    1416    ports:
    1517      - ${LOCAL_PORT-8889}:80
    1618
    1719    environment:
    1820      LOCAL_DIR: ${LOCAL_DIR-src}
     21      LOCAL_PORT: ${LOCAL_PORT-8889}
     22      LOCAL_URL: ${LOCAL_URL-wpdev.localhost}
    1923
    2024    volumes:
    2125      - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template
    2226      - ./:/var/www
    2327
    24     # Load our config file, substituning 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;'"
    2630
    2731    depends_on:
    2832      - php
  • .env

     
    11##
    22# Default configuration options for the local dev environment.
    33#
    4 # All of these options can be overriden by setting them as environment variables before starting
     4# All of these options can be overridden by setting them as environment variables before starting
    55# the environment. You will need to restart your environment when changing any of these.
    66##
    77
    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.
     10LOCAL_URL=wpdev.localhost
    911LOCAL_PORT=8889
    1012
    1113# Where to run WordPress from. Valid options are 'src' and 'build'.
     
    3133LOCAL_SCRIPT_DEBUG=true
    3234
    3335# The URL to use when running e2e tests.
    34 WP_BASE_URL=http://localhost:${LOCAL_PORT}
     36WP_BASE_URL=http://${LOCAL_URL}:${LOCAL_PORT}