Monitor websites uptime using Cloudflare Workers
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253# syntax=docker/dockerfile:1
# TypeScript is intentionally executed through tsx at runtime for the API,# scheduler, and Drizzle migrations. Keep the workspace sources and pnpm layout# in the runtime image rather than producing incomplete standalone bundles.FROM node:24-bookworm-slim AS base
ENV PNPM_HOME=/pnpm \ PATH=/pnpm:$PATH \ NODE_ENV=production
RUN npm install --global pnpm@11.24.0WORKDIR /app
FROM base AS dependencies
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.base.json ./COPY apps/api/package.json apps/api/package.jsonCOPY apps/probe-worker/package.json apps/probe-worker/package.jsonCOPY apps/scheduler/package.json apps/scheduler/package.jsonCOPY apps/web/package.json apps/web/package.jsonCOPY packages/config/package.json packages/config/package.jsonCOPY packages/contracts/package.json packages/contracts/package.jsonCOPY packages/database/package.json packages/database/package.jsonCOPY packages/notifications/package.json packages/notifications/package.jsonCOPY packages/regions/package.json packages/regions/package.jsonRUN pnpm install --frozen-lockfile
FROM dependencies AS workspace
COPY . .
FROM workspace AS api
CMD ["pnpm", "--filter", "@uptime/api", "start"]
FROM workspace AS scheduler
CMD ["pnpm", "--filter", "@uptime/scheduler", "start"]
FROM workspace AS migrate
CMD ["pnpm", "--filter", "@uptime/database", "migrate"]
FROM workspace AS web
# Vite writes a short-lived bundled-config module and dependency cache while it# serves development assets. The other runtime targets remain read-only.RUN chown -R node:node /appENV NODE_ENV=development
CMD ["pnpm", "--filter", "@uptime/web", "dev", "--host", "0.0.0.0", "--port", "5176"]