ignore: - node_modules - /apps/docs - /apps/screenshot-service - /apps/server - /apps/web - /apps/dashboard - /apps/status-page - /packages/analytics - /packages/api - /packages/error - /packages/tracker builders: install: fromImage: oven/bun:1.3.6 workdir: /app/ labels: org.opencontainers.image.stage: install bind: - bunfig.toml - package.json - apps/workflows/package.json - packages/assertions/package.json - packages/db/package.json - packages/emails/package.json - packages/notifications/base/package.json - packages/notifications/discord/package.json - packages/notifications/email/package.json - packages/notifications/google-chat/package.json - packages/notifications/ntfy/package.json - packages/notifications/opsgenie/package.json - packages/notifications/pagerduty/package.json - packages/notifications/slack/package.json - packages/notifications/telegram/package.json - packages/notifications/twillio-whatsapp/package.json - packages/notifications/twillio-sms/package.json - packages/notifications/webhook/package.json - packages/regions/package.json - packages/utils/package.json - packages/tsconfig/package.json - packages/tinybird/package.json - packages/upstash/package.json - packages/theme-store/package.json # Install dependencies run: bun install --production --frozen-lockfile --verbose cache: - /root/.bun/install/cache # Stage 4: Build application (compile to binary) build: fromImage: oven/bun:1.3.6 workdir: /app/apps/workflows labels: org.opencontainers.image.stage: build copy: - . /app/ - fromBuilder: install source: /app/node_modules target: /app/node_modules # Should set env to production here # Compile the TypeScript application env: NODE_ENV: production run: bun build --compile --target bun --sourcemap src/index.ts --outfile=app docker: fromImage: oven/bun:1.3.6 workdir: /app/apps/workflows copy: - . /app/ run: bun run src/build-docker.ts libsql: fromImage: oven/bun:1.3.6 workdir: /app/ copy: - fromBuilder: docker source: /app/apps/build-docker/package.json target: /app/package.json run: bun install ca-certs: fromImage: debian:bullseye-slim run: apt update && apt install -y ca-certificates curl && update-ca-certificates fromImage: debian:bullseye-slim workdir: /app/ # Metadata labels labels: org.opencontainers.image.title: OpenStatus Workflows org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus org.opencontainers.image.vendor: OpenStatus org.opencontainers.image.authors: OpenStatus Team # Copy artifacts from build stages copy: - fromBuilder: build source: /app/apps/workflows/app target: /app/apps/workflows/ chmod: "555" - fromBuilder: libsql source: /app/node_modules target: /app/packages/db/node_modules - fromBuilder: libsql source: /app/node_modules target: /app/node_modules - fromBuilder: ca-certs source: /etc/ssl/certs/ca-certificates.crt target: /etc/ssl/certs/ - fromBuilder: ca-certs source: /usr/bin/curl target: /usr/bin/curl expose: "3000" entrypoint: /app/apps/workflows/app