From a50a760f52653f3d0d0c469331d76f80b4f14fb6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 18:10:41 -0500 Subject: [PATCH] Dockerfile: support the PORT variable, expose 5000 by default --- Dockerfile | 4 +++- installation/docker.conf | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f93c5fdbe..a15e8aad9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,7 @@ ARG NODE_ENV=production RUN yarn build FROM nginx:stable-alpine -COPY installation/docker.conf /etc/nginx/conf.d/default.conf +EXPOSE 5000 +ENV PORT=5000 +COPY installation/docker.conf /etc/nginx/templates/default.conf.template COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf b/installation/docker.conf index cdd5699ae..072283fc7 100644 --- a/installation/docker.conf +++ b/installation/docker.conf @@ -1,5 +1,7 @@ # Soapbox Nginx for Docker. server { + listen ${PORT}; + keepalive_timeout 70; sendfile on; client_max_body_size 80m;