This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
# ---- build stage ----
|
# ---- build stage ----
|
||||||
FROM node:20-alpine AS build
|
FROM node:20-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /NautilusDesk
|
||||||
|
|
||||||
# Needed for node-gyp / native deps on Alpine
|
# Needed for node-gyp / native deps on Alpine
|
||||||
RUN apk add --no-cache python3 make g++ git
|
RUN apk add --no-cache python3 make g++ git
|
||||||
|
|
||||||
# Install deps
|
# Install deps
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
# If you have a package-lock.json, this will be deterministic.
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Copy source + build
|
# Copy source + build
|
||||||
@@ -16,7 +15,7 @@ RUN npm run build
|
|||||||
|
|
||||||
# ---- runtime stage ----
|
# ---- runtime stage ----
|
||||||
FROM node:20-alpine AS runtime
|
FROM node:20-alpine AS runtime
|
||||||
WORKDIR /app
|
WORKDIR /NautilusDesk/app
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
@@ -24,7 +23,7 @@ ENV HOST=0.0.0.0
|
|||||||
|
|
||||||
RUN addgroup -S nodegroup && adduser -S nodeuser -G nodegroup
|
RUN addgroup -S nodegroup && adduser -S nodeuser -G nodegroup
|
||||||
|
|
||||||
COPY --from=build /app/.output ./.output
|
COPY --from=build /NautilusDesk/app/.output ./.output
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
USER nodeuser
|
USER nodeuser
|
||||||
|
|||||||
Reference in New Issue
Block a user