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>
This commit is contained in:
+5
-3
@@ -1,14 +1,16 @@
|
||||
# Stage 1: Build Vite React App
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
COPY update-version.js .
|
||||
COPY frontend/package*.json frontend/
|
||||
WORKDIR /app/frontend
|
||||
RUN npm install
|
||||
COPY . .
|
||||
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/dist /usr/share/nginx/html
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user