Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make nginx' document root configurable #27

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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