Skip to content

Commit 647ccf5

Browse files
committed
Update Dockerfile and nginx configuration: Adjust cache directory creation and modify health check response
1 parent d033d8e commit 647ccf5

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARG NGINX_CONF=nginx.conf.template
1111
COPY $NGINX_CONF /etc/nginx/nginx.conf.template
1212
COPY health-monitor.sh /usr/local/bin/health-monitor.sh
1313

14-
RUN mkdir -p /var/cache/nginx && chown -R nginx:nginx /var/cache/nginx && \
14+
RUN mkdir -p /var/cache/nginx/owlery && chown -R nginx:nginx /var/cache/nginx && \
1515
chmod +x /usr/local/bin/health-monitor.sh
1616

1717
EXPOSE 80 8080

nginx.conf.template

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,18 @@ http {
4040

4141
location /health {
4242
access_log off;
43-
proxy_pass http://owlery/;
44-
proxy_connect_timeout 3s;
45-
proxy_read_timeout 3s;
46-
proxy_intercept_errors on;
47-
error_page 500 502 503 504 =503 "UPSTREAM_UNAVAILABLE\n";
43+
return 200 "OK\n";
4844
add_header Content-Type text/plain;
49-
add_header X-Upstream-Status $upstream_status;
5045
}
5146

5247
location / {
5348
proxy_pass http://owlery$request_uri;
5449
proxy_http_version 1.1;
5550
proxy_set_header Connection "";
56-
proxy_connect_timeout 90s;
57-
proxy_read_timeout 90s;
58-
proxy_send_timeout 90s;
59-
proxy_set_header Host $http_host;
51+
proxy_connect_timeout 900s;
52+
proxy_read_timeout 900s;
53+
proxy_send_timeout 900s;
54+
# proxy_set_header Host $host;
6055
proxy_set_header X-Real-IP $remote_addr;
6156
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6257
proxy_set_header X-Forwarded-Proto $scheme;
@@ -75,23 +70,18 @@ http {
7570

7671
location /health {
7772
access_log off;
78-
proxy_pass http://owlery/;
79-
proxy_connect_timeout 3s;
80-
proxy_read_timeout 3s;
81-
proxy_intercept_errors on;
82-
error_page 500 502 503 504 =503 "UPSTREAM_UNAVAILABLE\n";
73+
return 200 "OK\n";
8374
add_header Content-Type text/plain;
84-
add_header X-Upstream-Status $upstream_status;
8575
}
8676

8777
location / {
8878
proxy_pass http://owlery$request_uri;
8979
proxy_http_version 1.1;
9080
proxy_set_header Connection "";
91-
proxy_connect_timeout 90s;
92-
proxy_read_timeout 90s;
93-
proxy_send_timeout 90s;
94-
proxy_set_header Host $http_host;
81+
proxy_connect_timeout 900s;
82+
proxy_read_timeout 900s;
83+
proxy_send_timeout 900s;
84+
# proxy_set_header Host $host;
9585
proxy_set_header X-Real-IP $remote_addr;
9686
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
9787
proxy_set_header X-Forwarded-Proto $scheme;

0 commit comments

Comments
 (0)