feat: setup Gitea Actions CI/CD and Docker configuration
CI / CD / Lint & Build (CI) (push) Successful in 11m42s
CI / CD / Build & Push Docker Image (CD) (push) Failing after 3m49s

This commit is contained in:
2026-11-21 01:53:02 +07:00
parent 8a2ad04492
commit 4cb903f2f7
6 changed files with 204 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# Stage 1: Build TypeScript source code
FROM node:22-bookworm-slim AS builder
WORKDIR /app
# Install dependencies
COPY package*.json ./
RUN npm ci
# Copy TypeScript configuration and source
COPY tsconfig.json ./
COPY index.ts ./
# Compile to JavaScript (dist/)
RUN npm run build
# Stage 2: Production runtime image
FROM node:22-bookworm-slim AS runner
WORKDIR /app
ENV NODE_ENV=production
# Install only production dependencies
COPY package*.json ./
RUN npm ci --omit=dev && npm cache clean --force
# Copy compiled code from builder
COPY --from=builder /app/dist ./dist
# Create auth folder for persistent WhatsApp credentials
RUN mkdir -p /app/auth
VOLUME ["/app/auth"]
CMD ["npm", "start"]