Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place
1# Build from monorepo root: docker build -f apps/hosting-service/Dockerfile . 2 3# Stage 1: Build 4FROM oven/bun:1-alpine AS builder 5 6WORKDIR /app 7 8# Copy workspace configuration files 9COPY package.json bun.lock ./ 10COPY tsconfig.json ./ 11 12# Copy all workspace packages (needed for workspace: dependencies) 13COPY packages ./packages 14COPY apps/hosting-service ./apps/hosting-service 15COPY apps/main-app/package.json ./apps/main-app/package.json 16 17# Install dependencies 18RUN bun install --frozen-lockfile 19 20# Build the hosting service 21WORKDIR /app/apps/hosting-service 22RUN bun run build 23 24# Stage 2: Production 25FROM node:22-alpine AS production 26 27WORKDIR /app 28 29# Copy only the built file 30COPY --from=builder /app/apps/hosting-service/dist/index.js ./index.js 31 32# Create cache directory 33RUN mkdir -p ./cache/sites 34 35# Set environment variables 36ENV PORT=3001 37ENV NODE_ENV=production 38 39# Expose the application port 40EXPOSE 3001 41 42# Health check 43HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ 44 CMD wget --no-verbose --tries=1 --spider http://localhost:3001/health || exit 1 45 46# Start the application 47CMD ["node", "index.js"]