mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
Compare commits
6 Commits
84d7be052d
...
v0.6.0
| Author | SHA1 | Date | |
|---|---|---|---|
| b52e9d57c7 | |||
| 15f3183bc0 | |||
| ca3a5d1c0e | |||
| 6a1509d807 | |||
| e876f5eb02 | |||
| dabd2dff3b |
17
Dockerfile
17
Dockerfile
@@ -13,9 +13,10 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|||||||
# Copy root package files first
|
# Copy root package files first
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
COPY tsconfig.base.json ./
|
COPY tsconfig.base.json ./
|
||||||
|
COPY ecosystem.config.cjs ./
|
||||||
|
|
||||||
# Install root dependencies
|
# Install root dependencies
|
||||||
RUN npm install
|
RUN npm install --only=production
|
||||||
|
|
||||||
# Copy workspace files
|
# Copy workspace files
|
||||||
COPY backend/ ./backend/
|
COPY backend/ ./backend/
|
||||||
@@ -26,34 +27,44 @@ RUN npm install --workspace=backend
|
|||||||
RUN npm install --workspace=frontend
|
RUN npm install --workspace=frontend
|
||||||
|
|
||||||
# Build backend first
|
# Build backend first
|
||||||
RUN npm run build --workspace=backend
|
RUN npm run build --only=production --workspace=backend
|
||||||
|
|
||||||
# Build frontend
|
# Build frontend
|
||||||
RUN npm run build --workspace=frontend
|
RUN npm run build --only=production --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/ ./dist/database/
|
||||||
COPY --from=builder /app/backend/src/database/ ./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 && \
|
||||||
chmod 755 /app && \
|
chmod 755 /app && \
|
||||||
chmod 775 /app/data
|
chmod 775 /app/data
|
||||||
|
|
||||||
ENV PM2_HOME=/app/.pm2
|
ENV PM2_HOME=/app/.pm2
|
||||||
USER schichtplan
|
USER schichtplan
|
||||||
EXPOSE 3002
|
EXPOSE 3002
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3002/api/health || exit 1
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3002/api/health || exit 1
|
||||||
|
|
||||||
CMD ["pm2-runtime", "ecosystem.config.cjs"]
|
CMD ["pm2-runtime", "ecosystem.config.cjs"]
|
||||||
@@ -15,7 +15,8 @@
|
|||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@vitejs/plugin-react": "^4.3.3",
|
"@vitejs/plugin-react": "^4.3.3",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
"vite": "^6.0.7"
|
"vite": "^6.0.7",
|
||||||
|
"esbuild": "^0.21.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
1077
package-lock.json
generated
1077
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
2
premium
2
premium
Submodule premium updated: ce4b3fd6e0...c65016aaab
Reference in New Issue
Block a user