Add Dockerfile and Next.js standalone output for Coolify deployment

This commit is contained in:
Hermes Agent
2026-07-24 17:45:12 +00:00
parent 8bf9e6614c
commit 3f1f25ffaa
2 changed files with 19 additions and 1 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]