From 17cfaf8e3edccffb02217157d8d9cd126c7c0b89 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 13 Feb 2026 22:52:56 +0900 Subject: refactor(frontend): replace Node.js runtime with nginx in Dockerfile Co-Authored-By: Claude Opus 4.6 --- frontend/Dockerfile | 14 +++----------- frontend/nginx.conf | 9 +++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 frontend/nginx.conf (limited to 'frontend') diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 69aa4dc..7e2e616 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -14,17 +14,9 @@ ENV ALBATROSS_BASE_PATH="$ALBATROSS_BASE_PATH" RUN npm run build ################################################################################ -FROM node:22.14 +FROM nginx:1.27-alpine -WORKDIR /app -ENV NODE_ENV=production - -COPY package.json package-lock.json . -RUN npm install --omit=dev - -COPY --from=builder /app/build ./build +COPY --from=builder /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf -ENV HOST="$ALBATROSS_HOST" -ENV PORT=80 EXPOSE 80 -CMD ["npm", "run", "start"] diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 0000000..f749e02 --- /dev/null +++ b/frontend/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +} -- cgit v1.3.1