Skip to content

Commit b0d6337

Browse files
committed
Update nginx configuration with additional error and access logs
1 parent 4f349c4 commit b0d6337

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ services:
107107
- /etc/letsencrypt:/etc/letsencrypt
108108
ports:
109109
- "80:80"
110-
command: nginx -g 'daemon off;'
110+
command: nginx -g 'daemon off;' -g 'error_log /var/log/nginx/error.log debug;'
111111
depends_on:
112112
backend:
113113
condition: service_healthy

frontend/frontend.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV REACT_APP_BACKEND_URL=$REACT_APP_BACKEND_URL
1313
RUN npm run build
1414

1515
# Serve the app with nginx
16-
FROM nginx:alpine
16+
FROM nginx:1.25.3
1717
COPY --from=build /usr/src/app/build /usr/share/nginx/html
1818

1919
EXPOSE 80

frontend/my-app/nginx.conf

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ server {
8181
server {
8282
listen 80;
8383
server_name api.peterbull.org;
84-
84+
error_log /var/log/nginx/airflow_error.log warn;
85+
access_log /var/log/nginx/airflow_access.log combined;
8586
# backend
8687
location / {
8788
proxy_pass http://backend:8000;
@@ -99,6 +100,8 @@ server {
99100
proxy_set_header X-Forwarded-Proto $scheme;
100101
proxy_set_header X-Forwarded-Host $host;
101102
proxy_set_header X-Forwarded-Port $server_port;
103+
proxy_set_header Upgrade $http_upgrade;
104+
proxy_set_header Connection "upgrade";
102105
}
103106

104107
# Specify the error pages

0 commit comments

Comments
 (0)