Compare commits

...

6 Commits

Author SHA1 Message Date
6a1509d807 removed esbuild 2025-10-26 11:44:39 +01:00
e876f5eb02 fixed login ui 2025-10-26 10:24:07 +01:00
dabd2dff3b added ecosystem file to builder 2025-10-26 09:54:32 +01:00
84d7be052d added expicit copying database schema.sql 2025-10-26 01:51:08 +02:00
9460f10278 added expicit copying database schema.sql 2025-10-26 01:42:34 +02:00
6e1927fe2f added expicit copying database schema.sql 2025-10-26 01:37:13 +02:00
5 changed files with 4795 additions and 11 deletions

View File

@@ -10,12 +10,22 @@ RUN apt-get update && apt-get install -y python3 python3-pip build-essential \
# Create symlink so python3 is callable as python # Create symlink so python3 is callable as python
RUN ln -sf /usr/bin/python3 /usr/bin/python RUN ln -sf /usr/bin/python3 /usr/bin/python
# Copy all files # Copy root package files first
COPY . . COPY package*.json ./
COPY tsconfig.base.json ./
COPY ecosystem.config.cjs ./
# Use npm install instead of npm ci to avoid the bug # Install root dependencies
RUN npm install RUN npm install
# Copy workspace files
COPY backend/ ./backend/
COPY frontend/ ./frontend/
# Install workspace dependencies individually
RUN npm install --workspace=backend
RUN npm install --workspace=frontend
# Build backend first # Build backend first
RUN npm run build --workspace=backend RUN npm run build --workspace=backend
@@ -25,21 +35,22 @@ RUN npm run build --workspace=frontend
# Verify Python and OR-Tools installation # Verify Python and OR-Tools installation
RUN python -c "from ortools.sat.python import cp_model; print('OR-Tools installed successfully')" RUN python -c "from ortools.sat.python import cp_model; print('OR-Tools installed successfully')"
# Production stage - same as above # Production stage (same as above)
FROM node:20-bookworm FROM node:20-bookworm
WORKDIR /app WORKDIR /app
RUN npm install -g pm2 RUN npm install -g pm2
RUN mkdir -p /app/data RUN mkdir -p /app/data
COPY --from=builder /app/backend/dist/ ./dist/ COPY --from=builder /app/backend/dist/ ./dist/
COPY --from=builder /app/backend/package*.json ./ COPY --from=builder /app/backend/package*.json ./
COPY --from=builder /app/node_modules/ ./node_modules/ COPY --from=builder /app/node_modules/ ./node_modules/
COPY --from=builder /app/frontend/dist/ ./frontend-build/ COPY --from=builder /app/frontend/dist/ ./frontend-build/
COPY --from=builder /app/ecosystem.config.cjs ./ COPY --from=builder /app/ecosystem.config.cjs ./
COPY --from=builder /app/backend/src/database/ ./dist/database/
COPY --from=builder /app/backend/src/database/ ./database/
RUN groupadd -g 1001 nodejs && \ RUN groupadd -g 1001 nodejs && \
useradd -m -u 1001 -s /bin/bash -g nodejs schichtplan && \ useradd -m -u 1001 -s /bin/bash -g nodejs schichtplan && \
chown -R schichtplan:nodejs /app && \ chown -R schichtplan:nodejs /app && \

View File

@@ -9,6 +9,7 @@
"react-router-dom": "^6.28.0" "react-router-dom": "^6.28.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "20.19.23",
"@types/react": "^19.0.0", "@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0", "@types/react-dom": "^19.0.0",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",

View File

@@ -129,7 +129,7 @@ const Login: React.FC = () => {
onChange={(e) => setEmail(e.target.value)} onChange={(e) => setEmail(e.target.value)}
required required
style={{ style={{
width: '94.5%', width: '100%',
padding: '10px', padding: '10px',
border: '1px solid #ddd', border: '1px solid #ddd',
borderRadius: '4px', borderRadius: '4px',
@@ -151,7 +151,7 @@ const Login: React.FC = () => {
onChange={(e) => setPassword(e.target.value)} onChange={(e) => setPassword(e.target.value)}
required required
style={{ style={{
width: '94.5%', width: '100%',
padding: '10px', padding: '10px',
paddingRight: '10px', paddingRight: '10px',
border: '1px solid #ddd', border: '1px solid #ddd',

4772
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

Submodule premium updated: ce4b3fd6e0...c65016aaab