From ebb9e3f4fea1058d4e4d6fb0ce000d7b7478bf18 Mon Sep 17 00:00:00 2001 From: donpat1to Date: Wed, 22 Oct 2025 19:17:46 +0200 Subject: [PATCH 1/2] copying database folder seperate --- Dockerfile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e9ac0a..3103730 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,16 +47,10 @@ COPY frontend/public/ ./public/ RUN npm run build # Production stage -FROM node:20-alpine +FROM node:20-bullseye WORKDIR /app -# Install Python and OR-Tools for production -#RUN apk add --no-cache \ -# python \ -# py3-pip \ -# && pip3 install ortools - # Install PM2 for process management RUN npm install -g pm2 @@ -64,7 +58,6 @@ RUN npm install -g pm2 COPY --from=backend-builder /app/backend/package*.json ./ COPY --from=backend-builder /app/backend/dist/ ./dist/ COPY --from=backend-builder /app/backend/node_modules/ ./node_modules/ -# COPY --from=backend-builder /app/backend/python-scripts/ ./python-scripts/ # Copy frontend built files COPY --from=frontend-builder /app/frontend/build/ ./frontend-build/ From 49afd75ed30ae1a3fade34577739b57c2f2199f3 Mon Sep 17 00:00:00 2001 From: donpat1to Date: Wed, 22 Oct 2025 19:21:13 +0200 Subject: [PATCH 2/2] copying database folder seperate --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3103730..53cfb0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,13 +17,13 @@ COPY backend/tsconfig.json ./ # Install backend dependencies RUN npm ci -# Copy backend source +# Copy backend source and database files COPY backend/src/ ./src/ +COPY backend/database/ ./database/ # Build backend RUN npm run build - # Verify Python and OR-Tools installation RUN python -c "from ortools.sat.python import cp_model; print('OR-Tools installed successfully')" @@ -58,6 +58,7 @@ RUN npm install -g pm2 COPY --from=backend-builder /app/backend/package*.json ./ COPY --from=backend-builder /app/backend/dist/ ./dist/ COPY --from=backend-builder /app/backend/node_modules/ ./node_modules/ +COPY --from=backend-builder /app/backend/database/ ./dist/database/ # Copy frontend built files COPY --from=frontend-builder /app/frontend/build/ ./frontend-build/ @@ -72,10 +73,6 @@ RUN addgroup -g 1001 -S nodejs && \ USER schichtplan -# Verify installations -#RUN python --version && \ -# python -c "from ortools.sat.python import cp_model; print('OR-Tools verified')" - EXPOSE 3000 3002 HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \