aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-13 22:52:56 +0900
committernsfisis <nsfisis@gmail.com>2026-02-13 23:07:26 +0900
commit17cfaf8e3edccffb02217157d8d9cd126c7c0b89 (patch)
tree31c6ebf0dc5e5a7ab39726a4c80949b79b671b5d
parentb7b7fa4fb9004dc6698b5a07834e4f34837f7374 (diff)
downloadphperkaigi-2026-albatross-17cfaf8e3edccffb02217157d8d9cd126c7c0b89.tar.gz
phperkaigi-2026-albatross-17cfaf8e3edccffb02217157d8d9cd126c7c0b89.tar.zst
phperkaigi-2026-albatross-17cfaf8e3edccffb02217157d8d9cd126c7c0b89.zip
refactor(frontend): replace Node.js runtime with nginx in Dockerfile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-rw-r--r--frontend/Dockerfile14
-rw-r--r--frontend/nginx.conf9
2 files changed, 12 insertions, 11 deletions
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;
+ }
+}