diff --git a/Dockerfile b/Dockerfile index c3f19d68..f21b974f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,9 @@ ENV VITE_VERCEL_ENV production ARG BASE_URL ENV BASE_URL=${BASE_URL} COPY --from=build-stage /app/dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf -EXPOSE 8080 + +COPY nginx.conf /etc/nginx/templates/default.conf.template +ENV PORT=8080 +EXPOSE $PORT + CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf index 583a12a6..2f116c05 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,6 +1,6 @@ server { - listen 8080; - listen [::]:8080; + listen ${PORT}; + listen [::]:${PORT}; server_name _; root /usr/share/nginx/html; index index.html;