Skip to content

[home] Reintroduce nginx.conf.template #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions services/home/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

FROM nginx:1.27.5-alpine

# Set the default output directory for templating
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx

# Copy custom Nginx configuration
COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
COPY --chown=nginx:nginx nginx.conf /etc/nginx/templates/nginx.conf.template

# Copy built Docusaurus site from the buid folder
COPY --chown=nginx:nginx build /usr/share/nginx/html

# Nginx listens on 8080, expose it (for documentation/clarity)
EXPOSE 8080

# Start Nginx in the foreground
CMD [ "nginx", "-g", "daemon off;" ]
4 changes: 2 additions & 2 deletions services/home/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ http {
# ========= Server Block =========
server {
# Listen on the port specified by Cloud Run ($PORT), default is 8080
listen 8080 default_server;
listen [::]:8080 default_server;
listen ${PORT} default_server;
listen [::]:${PORT} default_server;

# https://stackoverflow.com/questions/62648644/hosting-docusaurus-v2-using-nginx
# prevent docusaurus to create a redirect to Cloud Run Endpoint or port 8080
Expand Down