Files
scoreodonto.com/frontend/Dockerfile
T
VPS 4 Builder 1d2d164a73 fix(docker): expand frontend build context to root so update-version.js is accessible
WORKDIR changed to /app/frontend so ../update-version.js resolves correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:52:58 +02:00

18 lines
644 B
Docker

# Stage 1: Build Vite React App
FROM node:20-alpine AS builder
WORKDIR /app
COPY update-version.js .
COPY frontend/package*.json frontend/
WORKDIR /app/frontend
RUN npm install
COPY frontend/ .
RUN npm run build
# Stage 2: Serve static files with high-performance Nginx on port 3013
FROM nginx:alpine
COPY --from=builder /app/frontend/dist /usr/share/nginx/html
# Simple internal Nginx routing for single-page React router stability
RUN echo 'server { listen 3013; location / { root /usr/share/nginx/html; index index.html; try_files $uri $uri/ /index.html; } }' > /etc/nginx/conf.d/default.conf
EXPOSE 3013
CMD ["nginx", "-g", "daemon off;"]