cicd
Some checks failed
Build and Release / release (push) Failing after 38s

This commit is contained in:
2026-04-19 19:45:58 +07:00
parent 7cff844e5b
commit fd37d95699
11 changed files with 115 additions and 20 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
FROM node:24-alpine AS base
# Stage 1: Dependencies Installation
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev
# Stage 2: Application Build
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
COPY .env .env
RUN npm run build
# Stage 3: Production Runner
FROM node:24-alpine AS runner
WORKDIR /app
# copy env runtime
COPY --from=builder /app/.env .env
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
USER node
EXPOSE 3000
CMD ["node", "server.js"]