Skip to content

Commit 42686d5

Browse files
nigelgbanksNigel Banks
andcommitted
Moved the nginx timeouts to the http context so they would apply everywhere as defaults (#188)
Co-authored-by: Nigel Banks <[email protected]:w>
1 parent 45144d6 commit 42686d5

File tree

15 files changed

+136
-102
lines changed

15 files changed

+136
-102
lines changed

.vscode/settings.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,23 @@
1414
"composer": "shellscript"
1515
},
1616
"cSpell.words": [
17-
"MODESHAPE",
18-
"POSTGRESQL",
19-
"SIGTERM",
2017
"binarystorage",
2118
"catchable",
2219
"classpath",
20+
"Confd",
2321
"crond",
2422
"elif",
23+
"fastcgi",
24+
"filesize",
2525
"getenv",
26+
"islandora",
27+
"KEEPALIVE",
28+
"MODESHAPE",
2629
"nativeplatform",
2730
"nocopy",
31+
"POSTGRESQL",
32+
"proxied",
33+
"SIGTERM",
2834
"xdebug"
2935
]
3036
}

crayfish/rootfs/etc/confd/conf.d/default.conf.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

crayfish/rootfs/etc/confd/templates/default.conf.tmpl renamed to crayfish/rootfs/etc/nginx/http.d/default.conf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ server {
1515

1616
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
1717
fastcgi_param DOCUMENT_ROOT $realpath_root;
18-
19-
fastcgi_read_timeout {{ getenv "NGINX_FASTCGI_READ_TIMEOUT" }};
20-
fastcgi_send_timeout {{ getenv "NGINX_FASTCGI_SEND_TIMEOUT" }};
21-
fastcgi_connect_timeout {{ getenv "NGINX_FASTCGI_CONNECT_TIMEOUT" }};
22-
proxy_read_timeout {{ getenv "NGINX_PROXY_READ_TIMEOUT" }};
23-
proxy_send_timeout {{ getenv "NGINX_PROXY_SEND_TIMEOUT" }};
24-
proxy_connect_timeout {{ getenv "NGINX_PROXY_CONNECT_TIMEOUT" }};
25-
send_timeout {{ getenv "NGINX_SEND_TIMEOUT" }};
26-
keepalive_timeout {{ getenv "NGINX_KEEPALIVE_TIMEOUT" }};
27-
client_body_timeout {{ getenv "NGINX_CLIENT_BODY_TIMEOUT" }};
28-
lingering_timeout {{ getenv "NGINX_LINGERING_TIMEOUT" }};
29-
3018
# Prevents URIs that include the front controller. This will 404:
3119
# http://domain.tld/index.php/some-path
3220
# Remove the internal directive to allow URIs like this

drupal/rootfs/etc/confd/conf.d/drupal.fpm.conf.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

drupal/rootfs/etc/confd/templates/drupal.fpm.conf.tmpl renamed to drupal/rootfs/etc/nginx/shared/drupal.fpm.conf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,4 @@ location ~ '\.php$|^/update.php' {
2929
fastcgi_buffer_size 32k;
3030
# PHP 7 socket location.
3131
fastcgi_pass unix:/var/run/php-fpm7/php-fpm7.sock;
32-
33-
# _ALL_ the timeouts
34-
fastcgi_read_timeout {{ getenv "NGINX_FASTCGI_READ_TIMEOUT" }};
35-
fastcgi_send_timeout {{ getenv "NGINX_FASTCGI_SEND_TIMEOUT" }};
36-
fastcgi_connect_timeout {{ getenv "NGINX_FASTCGI_CONNECT_TIMEOUT" }};
37-
proxy_read_timeout {{ getenv "NGINX_PROXY_READ_TIMEOUT" }};
38-
proxy_send_timeout {{ getenv "NGINX_PROXY_SEND_TIMEOUT" }};
39-
proxy_connect_timeout {{ getenv "NGINX_PROXY_CONNECT_TIMEOUT" }};
40-
send_timeout {{ getenv "NGINX_SEND_TIMEOUT" }};
41-
keepalive_timeout {{ getenv "NGINX_KEEPALIVE_TIMEOUT" }};
42-
client_body_timeout {{ getenv "NGINX_CLIENT_BODY_TIMEOUT" }};
43-
lingering_timeout {{ getenv "NGINX_LINGERING_TIMEOUT" }};
4432
}

homarus/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN --mount=type=cache,id=homarus-apk,sharing=locked,from=cache,target=/var/cach
1919

2020
ENV HOMARUS_LOG_LEVEL=debug
2121

22-
COPY --from=crayfish /etc/confd /etc/confd
22+
COPY --from=crayfish /etc/nginx/http.d/default.conf /etc/nginx/http.d/default.conf
2323
COPY --from=crayfish --chown=nginx:nginx /var/www /var/www
2424

2525
COPY rootfs /

houdini/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN --mount=type=bind,from=imagemagick,source=/packages,target=/packages \
2121

2222
ENV HOUDINI_LOG_LEVEL=debug
2323

24-
COPY --from=crayfish /etc/confd /etc/confd
24+
COPY --from=crayfish /etc/nginx/http.d/default.conf /etc/nginx/http.d/default.conf
2525
COPY --from=crayfish --chown=nginx:nginx /var/www /var/www
2626

2727
COPY rootfs /

hypercube/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ENV \
3232
HYPERCUBE_FCREPO_URL=fcrepo/fcrepo/rest \
3333
HYPERCUBE_LOG_LEVEL=debug
3434

35-
COPY --from=crayfish /etc/confd /etc/confd
35+
COPY --from=crayfish /etc/nginx/http.d/default.conf /etc/nginx/http.d/default.conf
3636
COPY --from=crayfish --chown=nginx:nginx /var/www /var/www
3737

3838
COPY rootfs /

milliner/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ENV \
1717
MILLINER_FEDORA6=false \
1818
MILLINER_LOG_LEVEL=debug
1919

20-
COPY --from=crayfish /etc/confd /etc/confd
20+
COPY --from=crayfish /etc/nginx/http.d/default.conf /etc/nginx/http.d/default.conf
2121
COPY --from=crayfish --chown=nginx:nginx /var/www /var/www
2222

2323
COPY rootfs /

nginx/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ RUN --mount=type=cache,id=nginx-apk,sharing=locked,from=cache,target=/var/cache/
3939
cleanup.sh
4040

4141
ENV \
42-
NGINX_CLIENT_BODY_TIMEOUT=60 \
42+
NGINX_CLIENT_BODY_TIMEOUT=60s \
4343
NGINX_CLIENT_MAX_BODY_SIZE=0 \
4444
NGINX_ERROR_LOG_LEVEL=warn \
45-
NGINX_FASTCGI_READ_TIMEOUT=60 \
46-
NGINX_FASTCGI_SEND_TIMEOUT=60 \
47-
NGINX_FASTCGI_CONNECT_TIMEOUT=60 \
48-
NGINX_KEEPALIVE_TIMEOUT=65 \
49-
NGINX_LINGERING_TIMEOUT=60 \
50-
NGINX_PROXY_READ_TIMEOUT=60 \
51-
NGINX_PROXY_SEND_TIMEOUT=60 \
52-
NGINX_PROXY_CONNECT_TIMEOUT=60 \
53-
NGINX_SEND_TIMEOUT=60 \
45+
NGINX_FASTCGI_CONNECT_TIMEOUT=60s \
46+
NGINX_FASTCGI_READ_TIMEOUT=60s \
47+
NGINX_FASTCGI_SEND_TIMEOUT=60s \
48+
NGINX_KEEPALIVE_TIMEOUT=75s \
49+
NGINX_LINGERING_TIMEOUT=5s \
50+
NGINX_PROXY_CONNECT_TIMEOUT=60s \
51+
NGINX_PROXY_READ_TIMEOUT=60s \
52+
NGINX_PROXY_SEND_TIMEOUT=60s \
53+
NGINX_SEND_TIMEOUT=60s \
5454
NGINX_WORKER_CONNECTIONS=1024 \
5555
NGINX_WORKER_PROCESSES=auto \
5656
PHP_DEFAULT_SOCKET_TIMEOUT=60 \

0 commit comments

Comments
 (0)