feat: add worker loop and production Dockerfiles
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
FROM node:22-slim AS build
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY prisma ./prisma
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npx prisma generate && npm run build
|
||||
|
||||
FROM node:22-slim AS run
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=build /app/.next/standalone ./
|
||||
COPY --from=build /app/.next/static ./.next/static
|
||||
COPY --from=build /app/public ./public
|
||||
COPY --from=build /app/prisma ./prisma
|
||||
COPY --from=build /app/node_modules/prisma ./node_modules/prisma
|
||||
COPY --from=build /app/node_modules/@prisma ./node_modules/@prisma
|
||||
COPY --from=build /app/docker-entrypoint.sh ./
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
EXPOSE 3000
|
||||
CMD ["./docker-entrypoint.sh"]
|
||||
Reference in New Issue
Block a user