From 46ea364d3159d2657c7d767f750a683e6722d155 Mon Sep 17 00:00:00 2001 From: Andres Corazon Santana Aquino Date: Wed, 21 Oct 2026 11:53:26 -0400 Subject: [PATCH] Restore Docker and nginx deployment files from remote initial commit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .dockerignore | 3 +++ Dockerfile | 9 +++++++++ nginx.conf | 17 +++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9146a39 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +dist +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6cb290c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:20-alpine AS build +WORKDIR /app +COPY . . +RUN node build.mjs + +FROM nginx:alpine +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/dist /usr/share/nginx/html +EXPOSE 80 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..b4f3dc8 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + gzip on; + gzip_types text/css application/javascript image/svg+xml application/xml; + + location /assets/ { + add_header Cache-Control "public, max-age=604800, stale-while-revalidate=86400"; + } + + location / { + try_files $uri $uri/index.html =404; + } + + error_page 404 /404.html; +}