Skip to content
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
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ RUN mkdir /target && \

# Serve the generated html using nginx
FROM nginxinc/nginx-unprivileged:alpine
RUN sed -i '3 a\ absolute_redirect off;' /etc/nginx/conf.d/default.conf && \
sed -i '4 a\ add_header X-Frame-Options DENY always;' /etc/nginx/conf.d/default.conf && \
sed -i 's/#error_page 404/error_page 404/' /etc/nginx/conf.d/default.conf
COPY site.conf /etc/nginx/conf.d/default.conf
COPY --from=build /target /usr/share/nginx/html

EXPOSE 8080
25 changes: 25 additions & 0 deletions site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
server {
listen 8080;
server_name localhost;
absolute_redirect off;
root /usr/share/nginx/html;

add_header X-Frame-Options DENY always;

location / {
index index.html index.htm;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}

# Health check endpoint for k8s probes and external uptime monitors to use (e.g. UptimeRobot).
# access log off to keep frequent health checks from cluttering the logs.
location = /healthz {
access_log off;
default_type text/plain;
return 200 'ok';
}
}
Loading