Added Docker support

This commit is contained in:
maziggy
2025-12-09 17:10:31 +00:00
parent 8618159baa
commit 8ce64ff38b
+5 -11
View File
@@ -1,19 +1,13 @@
# Build frontend
FROM node:22-alpine AS frontend-builder
FROM node:22-bookworm-slim AS frontend-builder
WORKDIR /app/frontend
# Create non-root user for npm
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001 -G nodejs && \
chown -R nodejs:nodejs /app
COPY frontend/package*.json ./
RUN npm ci --ignore-scripts && \
npm rebuild esbuild
USER nodejs
COPY --chown=nodejs:nodejs frontend/package*.json ./
RUN npm ci
COPY --chown=nodejs:nodejs frontend/ ./
COPY frontend/ ./
RUN npm run build
# Production image