add cicd on gitea

This commit is contained in:
Ahmad Ardiansyah
2025-11-13 17:11:33 +07:00
parent af4bbe9b15
commit 7d63564023
8 changed files with 3003 additions and 1 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
# ---- Stage 1: Build ----
FROM node:24-alpine AS builder
WORKDIR /app
# Install dependencies first (for caching)
COPY package.json package-lock.json* pnpm-lock.yaml* bun.lockb* ./
# If you're using pnpm or bun, adjust the install command below
RUN npm install
# Copy the source code
COPY . .
# Build the SvelteKit app
RUN npm run build
# ---- Stage 2: Production Runtime ----
FROM node:24-alpine AS runtime
WORKDIR /app
# Copy built output and production deps
COPY --from=builder /app/package.json ./
COPY --from=builder /app/build ./build
COPY --from=builder /app/node_modules ./node_modules
# Default environment variables
ENV NODE_ENV=production
ENV PORT=3000
EXPOSE 3000
# Start the SvelteKit app
CMD ["node", "build"]