forked from
nekomimi.pet/wisp.place-monorepo
Monorepo for Wisp.place. A static site hosting service built on top of the AT Protocol.
1# Use official Bun image
2FROM oven/bun:1.3 AS base
3
4# Set working directory
5WORKDIR /app
6
7# Copy package files
8COPY package.json bun.lock ./
9
10# Install dependencies
11RUN bun install --frozen-lockfile --production
12
13# Copy source code
14COPY src ./src
15
16# Create cache directory
17RUN mkdir -p ./cache/sites
18
19# Set environment variables (can be overridden at runtime)
20ENV PORT=3001
21ENV NODE_ENV=production
22
23# Expose the application port
24EXPOSE 3001
25
26# Health check
27HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
28 CMD bun -e "fetch('http://localhost:3001/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"
29
30# Start the application
31CMD ["bun", "src/index.ts"]