Make WordPress Core

Ticket #47767: 47767.19.diff

File 47767.19.diff, 1.4 KB (added by pento, 6 years ago)
  • docker-compose.yml

    diff --git a/docker-compose.yml b/docker-compose.yml
    index 520dcb3383..255b6c8a7c 100644
    a b services: 
    1212      - wpdevnet
    1313
    1414    ports:
    15       - ${LOCAL_PORT-8889}:80
     15      - ${LOCAL_PORT-8889}:${LOCAL_PORT-8889}
    1616
    1717    environment:
    1818      LOCAL_DIR: ${LOCAL_DIR-src}
     19      LOCAL_PORT: ${LOCAL_PORT-8889}
    1920
    2021    volumes:
    2122      - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template
    2223      - ./:/var/www
    2324
    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;'"
     25    # Load our config file, substituting environment variables into the config.
     26    command: /bin/sh -c "envsubst '$$LOCAL_DIR $$LOCAL_PORT' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
    2627
    2728    depends_on:
    2829      - php
  • tools/local-env/default.template

    diff --git a/tools/local-env/default.template b/tools/local-env/default.template
    index 21bfac0e1f..310f996882 100644
    a b  
    11server {
    22        index index.php index.html;
    33
    4         listen 80 default_server;
    5         listen [::]:80 default_server;
     4        listen ${LOCAL_PORT} default_server;
     5        listen [::]:${LOCAL_PORT} default_server;
    66
    77        server_name localhost;
    88