Skip to content

Commit

Permalink
Added support for nginx port customization
Browse files Browse the repository at this point in the history
  • Loading branch information
tk-nguyen committed Sep 30, 2024
1 parent 637644f commit 567d389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN --mount=type=ssh,required=true ./scripts/build-web.sh
FROM nginx:alpine AS final-image
ARG TWAKECHAT_BASE_HREF
ENV TWAKECHAT_BASE_HREF=${TWAKECHAT_BASE_HREF:-/web/}
ENV TWAKECHAT_LISTEN_PORT="80"
RUN rm -rf /usr/share/nginx/html
COPY --from=web-builder /app/build/web /usr/share/nginx/html${TWAKECHAT_BASE_HREF}
COPY ./configurations/nginx.conf.template /etc/nginx/templates/default.conf.template
Expand Down
2 changes: 1 addition & 1 deletion configurations/nginx.conf.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen ${TWAKECHAT_LISTEN_PORT};

location = / {
return 301 ${TWAKECHAT_BASE_HREF};
Expand Down

0 comments on commit 567d389

Please sign in to comment.