Initial commit

This commit is contained in:
2025-10-22 10:23:49 -07:00
commit ed6cf5e2af
78 changed files with 14686 additions and 0 deletions

31
api/Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
# Multi-stage build for Hono API
FROM node:20-alpine AS base
WORKDIR /app
# Install dependencies
FROM base AS deps
COPY package.json ./
RUN npm install
# Build TypeScript
FROM base AS builder
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
# Production image
FROM base AS runner
ENV NODE_ENV=production
# Copy built files and production dependencies
COPY --from=builder /app/dist ./dist
COPY --from=deps /app/node_modules ./node_modules
COPY package.json ./
# Health check
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=40s \
CMD node -e "require('http').get('http://127.0.0.1:3000/health', (r) => r.statusCode === 200 ? process.exit(0) : process.exit(1))"
EXPOSE 3000
CMD ["npm", "start"]