Ticket #47767: 47767.patch
File 47767.patch, 1.5 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 9 server_name localhost; 8 10 -
docker-compose.yml
9 9 image: nginx:alpine 10 10 11 11 networks: 12 - wpdevnet 12 wpdevnet: 13 aliases: 14 - wpdev.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} 19 22 20 23 volumes: 21 24 - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template 22 25 - ./:/var/www 23 26 24 27 # 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 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;'" 26 29 27 30 depends_on: 28 31 - php