Fixed config info

This commit is contained in:
2025-04-11 00:51:37 -04:00
parent 8b68653b6f
commit 56ac66e9b1
29 changed files with 682 additions and 70 deletions

View File

@@ -1,30 +1,33 @@
FROM node:18-alpine AS base
# ============
# Builder Stage
# ============
FROM base AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /builder
COPY . .
RUN \
if [ -f package.json ]; then npm i && npm run build; \
else echo "package.json not found." && exit 2; \
if [ -f package.json ]; then \
npm i && \
npm run build; \
else \
echo "package.json not found." && \
exit 2; \
fi
# ============
# Runtime Stage
# ============
FROM base AS runner
ARG PORT=3000
ENV PORT=${PORT}
ENV NODE_ENV=production
WORKDIR /app
ENV NODE_ENV=production
#RUN addgroup --system --gid 1001 node
#RUN adduser --system --uid 1001 node
COPY --from=builder /builder /app
#RUN chown -R node:node /app
COPY --chown=node --from=builder /builder /app
USER node
EXPOSE ${PORT}
CMD ["npm", "run", "dev"]