mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Added Docker support
This commit is contained in:
+5
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user