docker
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
ENV PORT=3001
|
||||
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/next.config.js ./next.config.js
|
||||
COPY --from=builder /app/jsconfig.json ./jsconfig.json
|
||||
COPY --from=builder /app/src ./src
|
||||
|
||||
RUN mkdir -p /app/data /app/public/uploads/attachments
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["npm", "run", "start", "--", "-p", "3001", "-H", "0.0.0.0"]
|
||||
Reference in New Issue
Block a user