diff --git a/Dockerfile b/Dockerfile index b3182b4..04d98e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,7 @@ COPY --from=builder /src /src # install nginx RUN yum install nginx -y +# allows nginx to run on port 80 without being root user RUN setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx # chown nginx directories diff --git a/deployment/nginx/nginx.conf b/deployment/nginx/nginx.conf index f3a48b6..c64485a 100644 --- a/deployment/nginx/nginx.conf +++ b/deployment/nginx/nginx.conf @@ -36,7 +36,7 @@ http { server_name localhost; location / { - proxy_pass http://localhost:8000; + proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }