Skip to content

Commit

Permalink
Merge pull request #27 from reload/nginx-document-root
Browse files Browse the repository at this point in the history
Make nginx' document root configurable
  • Loading branch information
arnested authored Nov 25, 2024
2 parents d0077fd + 5e58429 commit bdb9acd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <no default>
```

Expand All @@ -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
```

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion context/drupal/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server {

include include.d/ssl.conf;

root /var/www/web;
root ${NGINX_DOCUMENT_ROOT};

disable_symlinks off;

Expand Down
2 changes: 1 addition & 1 deletion context/nextjs/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server {

include include.d/ssl.conf;

root /var/www/web;
root ${NGINX_DOCUMENT_ROOT};

location / {
proxy_pass ${NGINX_PROXY_PASS};
Expand Down
2 changes: 1 addition & 1 deletion context/proxy/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server {

include include.d/ssl.conf;

root /var/www/web;
root ${NGINX_DOCUMENT_ROOT};

location / {
proxy_pass ${NGINX_PROXY_PASS};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server {

include include.d/ssl.conf;

root /var/www/web;
root ${NGINX_DOCUMENT_ROOT};

location / {
proxy_pass ${NGINX_PROXY_PASS};
Expand Down

0 comments on commit bdb9acd

Please sign in to comment.