syco.me Homelab Dashboard
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
# Stage 1: build frontend + compile server
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: runtime (only prod deps + build artifacts)
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/dist-server ./dist-server
|
||||
EXPOSE 3001
|
||||
CMD ["node", "dist-server/index.js"]
|
||||
Reference in New Issue
Block a user