Update Dockerfile

master
Dex Burgess 2024-08-18 02:10:30 +00:00
parent 84e70afd4c
commit f1eb9d827b
1 changed files with 3 additions and 5 deletions

View File

@ -9,8 +9,6 @@ RUN yarn install
# Rebuild the source code only when needed # Rebuild the source code only when needed
FROM node:20-alpine AS builder FROM node:20-alpine AS builder
ENV NEXT_PRIVATE_STANDALONE true
WORKDIR /app WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
@ -23,7 +21,7 @@ RUN yarn build
FROM node:20-alpine AS runner FROM node:20-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV=production
RUN addgroup --system --gid 1001 ss_site RUN addgroup --system --gid 1001 ss_site
RUN adduser --system --uid 1001 ss_site RUN adduser --system --uid 1001 ss_site
@ -40,7 +38,7 @@ USER ss_site
EXPOSE 3000 EXPOSE 3000
ENV PORT 3000 ENV PORT=3000
ENV HOSTNAME "0.0.0.0" ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"] CMD ["node", "server.js"]