Something went wrong. Try again.
Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
Something went wrong. Try again.
1.3 kB · 45 lines
Dockerfile
12345678910111213141516171819202122232425262728293031323334353637383940414243444546# Build from monorepo root: docker build -f apps/hosting-service/Dockerfile .
# Stage 1: Compile to standalone binaryFROM oven/bun:1.4.2-alpine AS builder
WORKDIR /app
# Copy workspace configuration filesCOPY package.json bun.lock tsconfig.json ./COPY patches ./patches
# Copy all workspace packages (needed for workspace: dependencies)COPY packages ./packagesCOPY apps/hosting-service ./apps/hosting-serviceCOPY apps/main-app/package.json ./apps/main-app/package.jsonCOPY apps/firehose-service/package.json ./apps/firehose-service/package.jsonCOPY apps/webhook-service/package.json ./apps/webhook-service/package.jsonCOPY cli/package.json ./cli/package.json
# Install dependenciesRUN bun install --frozen-lockfile
# Compile to a single binaryRUN NODE_ENV=production bun build --compile --minify apps/hosting-service/src/index.ts --outfile /app/hosting
# Stage 2: Minimal runtimeFROM alpine:3.22
RUN apk add --no-cache libstdc++ libgcc
COPY --from=builder /app/hosting /usr/local/bin/hosting
# Create cache directoryRUN mkdir -p /cache/sites
ENV PORT=3001ENV NODE_ENV=productionENV CACHE_DIR=/cache/sites
EXPOSE 3001
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3001/health || exit 1
CMD ["hosting"]