diff --git a/Dockerfile b/Dockerfile index 5fefa13..d0cf6fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ WORKDIR "${workdir}" HEALTHCHECK --interval=10s --start-period=90s CMD netstat -ltn | grep -c ":443" ENV EXPIRATION_DAYS=30 +ENV NGINX_DOCUMENT_ROOT=/var/www/web ## # Drupal diff --git a/README.md b/README.md index 7e9e9fc..54c0a97 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Use can use the following configuration in your `docker-compose.yml`: ```yaml environment: + NGINX_DOCUMENT_ROOT: /var/www/web NGINX_PROXY_PASS: ``` @@ -81,6 +82,7 @@ Use can use the following configuration in your `docker-compose.yml`: ```yaml environment: + NGINX_DOCUMENT_ROOT: /var/www/web NGINX_PROXY_PASS: app:3000 ``` @@ -100,6 +102,7 @@ Use can use the following configuration in your `docker-compose.yml`: ```yaml environment: + NGINX_DOCUMENT_ROOT: /var/www/web NGINX_FASTCGI_PASS_HOST: php NGINX_FASTCGI_PASS_PORT: 9000 NGINX_CLIENT_MAX_BODY_SIZE: 128M diff --git a/context/drupal/etc/nginx/templates/default.conf.template b/context/drupal/etc/nginx/templates/default.conf.template index b87c029..fa88695 100644 --- a/context/drupal/etc/nginx/templates/default.conf.template +++ b/context/drupal/etc/nginx/templates/default.conf.template @@ -6,7 +6,7 @@ server { include include.d/ssl.conf; - root /var/www/web; + root ${NGINX_DOCUMENT_ROOT}; disable_symlinks off; diff --git a/context/nextjs/etc/nginx/templates/default.conf.template b/context/nextjs/etc/nginx/templates/default.conf.template index 5911c45..c97eb43 100644 --- a/context/nextjs/etc/nginx/templates/default.conf.template +++ b/context/nextjs/etc/nginx/templates/default.conf.template @@ -2,7 +2,7 @@ server { include include.d/ssl.conf; - root /var/www/web; + root ${NGINX_DOCUMENT_ROOT}; location / { proxy_pass ${NGINX_PROXY_PASS}; diff --git a/context/proxy/etc/nginx/templates/default.conf.template b/context/proxy/etc/nginx/templates/default.conf.template index b889a96..adabf1d 100644 --- a/context/proxy/etc/nginx/templates/default.conf.template +++ b/context/proxy/etc/nginx/templates/default.conf.template @@ -2,7 +2,7 @@ server { include include.d/ssl.conf; - root /var/www/web; + root ${NGINX_DOCUMENT_ROOT}; location / { proxy_pass ${NGINX_PROXY_PASS}; diff --git a/context/storybook/etc/nginx/templates/default.conf.template b/context/storybook/etc/nginx/templates/default.conf.template index d8c675a..c79c4f4 100644 --- a/context/storybook/etc/nginx/templates/default.conf.template +++ b/context/storybook/etc/nginx/templates/default.conf.template @@ -2,7 +2,7 @@ server { include include.d/ssl.conf; - root /var/www/web; + root ${NGINX_DOCUMENT_ROOT}; location / { proxy_pass ${NGINX_PROXY_PASS};