feat: normaliser les URL production par entité
All checks were successful
Validation Dashboard / Tests backend et build frontend (push) Successful in 58s
All checks were successful
Validation Dashboard / Tests backend et build frontend (push) Successful in 58s
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -1,43 +1,34 @@
|
||||
# Stage 1: Build frontend
|
||||
# Stage 1: Build frontend from Git-tracked sources
|
||||
FROM node:20-alpine AS frontend-builder
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
# Copy frontend package files
|
||||
COPY frontend/package.json frontend/pnpm-lock.yaml* ./
|
||||
# Copy frontend package files and source from the versioned src tree.
|
||||
COPY src/frontend/package.json src/frontend/pnpm-lock.yaml* ./
|
||||
RUN npm install
|
||||
|
||||
# Copy frontend source
|
||||
COPY frontend/ ./
|
||||
|
||||
# Build frontend
|
||||
COPY src/frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Production
|
||||
# Stage 2: Production runtime
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install docker CLI for docker compose commands
|
||||
# Docker controls are required by the dashboard runtime.
|
||||
RUN apk add --no-cache docker-cli docker-cli-compose git curl unzip bash openssh-client
|
||||
|
||||
# Configure git global identity to avoid "Author identity unknown" errors
|
||||
RUN git config --global user.email "admin@santinova-soft.org" && \
|
||||
git config --global user.name "Manus Dashboard"
|
||||
|
||||
# Copy backend
|
||||
COPY backend/package.json ./backend/
|
||||
# Copy backend dependencies and source from the versioned src tree.
|
||||
COPY src/backend/package.json src/backend/package-lock.json ./backend/
|
||||
WORKDIR /app/backend
|
||||
RUN npm install --production
|
||||
RUN npm ci --omit=dev
|
||||
COPY src/backend/ ./
|
||||
|
||||
COPY backend/ ./
|
||||
|
||||
# Copy built frontend
|
||||
# Copy the frontend built from the same Git revision.
|
||||
WORKDIR /app
|
||||
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
|
||||
|
||||
WORKDIR /app/backend
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["node", "src/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user