fix(docker): 🐛 Fix the whole docker deployment pipeline
I've been able to deploy the application on another machine (finally).
This commit is contained in:
@ -18,14 +18,12 @@ FROM base AS builder
|
||||
COPY --from=installer /app/ .
|
||||
COPY --from=pruner /app/out/full/ .
|
||||
RUN apt-get -qy update && apt-get -qy install openssl
|
||||
RUN yarn turbo run build --scope=${SCOPE} --include-dependencies --no-deps
|
||||
RUN yarn turbo run build --scope=${SCOPE} --include-dependencies
|
||||
RUN find . -name node_modules | xargs rm -rf
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV production
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
COPY ./packages/db/prisma ./prisma
|
||||
COPY --from=installer /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/apps/${SCOPE}/next.config.js ./
|
||||
@ -33,8 +31,7 @@ COPY --from=builder /app/apps/${SCOPE}/public ./public
|
||||
COPY --from=builder /app/apps/${SCOPE}/package.json ./package.json
|
||||
COPY --from=builder /app/apps/${SCOPE}/.next/standalone ./
|
||||
COPY --from=builder /app/apps/${SCOPE}/.next/static ./.next/static
|
||||
RUN chown -Rf nextjs:nodejs /app
|
||||
USER nextjs
|
||||
RUN apt-get -qy update && apt-get -qy install openssl
|
||||
EXPOSE 3000
|
||||
ENV PORT 3000
|
||||
CMD ["node", "server.js"]
|
Reference in New Issue
Block a user