Initial commit: add .gitignore and README

This commit is contained in:
defiQUG
2026-02-09 21:51:31 -08:00
commit ef7df1fb2f
58 changed files with 8414 additions and 0 deletions

56
Dockerfile Normal file
View File

@@ -0,0 +1,56 @@
# Multi-stage build for production
# Stage 1: Build
FROM node:20-alpine AS builder
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml* ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source files
COPY . .
# Generate Prisma client
RUN pnpm exec prisma generate
# Build TypeScript
RUN pnpm run build
# Stage 2: Production
FROM node:20-alpine AS production
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml* ./
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
# Copy built files from builder
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/prisma ./prisma
# Create logs directory
RUN mkdir -p logs
# Expose port
EXPOSE 3000
# Set environment to production
ENV NODE_ENV=production
# Start the application
CMD ["node", "dist/index.js"]