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:
+4
-2
@@ -37,6 +37,8 @@ services:
|
||||
- NATS_URL=nats://10.99.0.3:4222
|
||||
- TEMPORAL_ADDRESS=10.99.0.3:7233
|
||||
- BAILEYS_SESSIONS_PATH=/app/sessions
|
||||
- APP_URL=https://scoreodonto.com
|
||||
- GOOGLE_REDIRECT_URI=https://scoreodonto.com/api/oauth2callback
|
||||
volumes:
|
||||
- "/home/deploy/scoreodonto-sessions:/app/sessions"
|
||||
- "/home/deploy/scoreodonto-media:/app/media"
|
||||
@@ -47,8 +49,8 @@ services:
|
||||
|
||||
scoreodonto-frontend:
|
||||
build:
|
||||
context: "./frontend"
|
||||
dockerfile: Dockerfile
|
||||
context: "."
|
||||
dockerfile: frontend/Dockerfile
|
||||
restart: always
|
||||
env_file:
|
||||
- "./frontend/.env.production.local"
|
||||
|
||||
+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