Update Dockerfile

This commit is contained in:
Marvin
2025-08-12 12:04:04 +02:00
committed by GitHub
parent a2481362a2
commit 1f83fb68f0

View File

@@ -1,5 +1,5 @@
# Stage 1: Install dependencies and build frontend # Stage 1: Install dependencies and build frontend
FROM node:18-alpine AS deps FROM node:22-alpine AS deps
WORKDIR /app WORKDIR /app
RUN apk add --no-cache python3 make g++ RUN apk add --no-cache python3 make g++
@@ -26,7 +26,7 @@ COPY . .
RUN npm run build:backend RUN npm run build:backend
# Stage 4: Production dependencies # Stage 4: Production dependencies
FROM node:18-alpine AS production-deps FROM node:22-alpine AS production-deps
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
@@ -35,7 +35,7 @@ RUN npm ci --only=production --ignore-scripts --force && \
npm cache clean --force npm cache clean --force
# Stage 5: Build native modules # Stage 5: Build native modules
FROM node:18-alpine AS native-builder FROM node:22-alpine AS native-builder
WORKDIR /app WORKDIR /app
RUN apk add --no-cache python3 make g++ RUN apk add --no-cache python3 make g++
@@ -46,7 +46,7 @@ RUN npm ci --only=production bcryptjs better-sqlite3 --force && \
npm cache clean --force npm cache clean --force
# Stage 6: Final image # Stage 6: Final image
FROM node:18-alpine FROM node:22-alpine
ENV DATA_DIR=/app/data \ ENV DATA_DIR=/app/data \
PORT=8080 \ PORT=8080 \
NODE_ENV=production NODE_ENV=production
@@ -76,4 +76,4 @@ EXPOSE ${PORT} 8081 8082 8083 8084
COPY docker/entrypoint.sh /entrypoint.sh COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"] CMD ["/entrypoint.sh"]