Openstatus www.openstatus.dev
at 552ff64ccfdc1d64cbb4ed6bec9b157e937e2ed3 109 lines 3.3 kB view raw
1ignore: 2 - node_modules 3 - /apps/docs 4 - /apps/screenshot-service 5 - /apps/server 6 - /apps/web 7 - /apps/dashboard 8 - /apps/status-page 9 - /packages/analytics 10 - /packages/api 11 - /packages/error 12 - /packages/tracker 13builders: 14 install: 15 fromImage: oven/bun:1.3.3 16 workdir: /app/ 17 labels: 18 org.opencontainers.image.stage: install 19 bind: 20 - bunfig.toml 21 - package.json 22 - apps/workflows/package.json 23 - packages/assertions/package.json 24 - packages/db/package.json 25 - packages/emails/package.json 26 - packages/notifications/discord/package.json 27 - packages/notifications/email/package.json 28 - packages/notifications/ntfy/package.json 29 - packages/notifications/opsgenie/package.json 30 - packages/notifications/pagerduty/package.json 31 - packages/notifications/slack/package.json 32 - packages/notifications/twillio-sms/package.json 33 - packages/notifications/webhook/package.json 34 - packages/regions/package.json 35 - packages/utils/package.json 36 - packages/tsconfig/package.json 37 - packages/tinybird/package.json 38 - packages/upstash/package.json 39 - packages/theme-store/package.json 40 # Install dependencies 41 run: bun install --production --frozen-lockfile --verbose 42 cache: 43 - /root/.bun/install/cache 44 45 # Stage 4: Build application (compile to binary) 46 build: 47 fromImage: oven/bun:1.3.3 48 workdir: /app/apps/workflows 49 labels: 50 org.opencontainers.image.stage: build 51 copy: 52 - . /app/ 53 - fromBuilder: install 54 source: /app/node_modules 55 target: /app/node_modules 56 # Should set env to production here 57 # Compile the TypeScript application 58 env: 59 NODE_ENV: production 60 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql 61 62 docker: 63 fromImage: oven/bun:1.3.3 64 workdir: /app/apps/workflows 65 copy: 66 - . /app/ 67 run: bun run src/build-docker.ts 68 69 libsql: 70 fromImage: oven/bun:1.3.3 71 workdir: /app/ 72 copy: 73 - fromBuilder: docker 74 source: /app/apps/build-docker/package.json 75 target: /app/package.json 76 run: bun install 77 78 ca-certs: 79 fromImage: debian:bullseye-slim 80 run: apt update && apt install -y ca-certificates && update-ca-certificates 81 82fromImage: debian:bullseye-slim 83workdir: /app/ 84 85# Metadata labels 86labels: 87 org.opencontainers.image.title: OpenStatus Workflows 88 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus 89 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 90 org.opencontainers.image.vendor: OpenStatus 91 org.opencontainers.image.authors: OpenStatus Team 92 93# Copy artifacts from build stages 94copy: 95 - fromBuilder: build 96 source: /app/apps/workflows/app 97 target: /app/apps/workflows/ 98 chmod: "555" 99 - fromBuilder: libsql 100 source: /app/node_modules 101 target: /app/packages/db/node_modules 102 - fromBuilder: libsql 103 source: /app/node_modules 104 target: /app/node_modules 105 - fromBuilder: ca-certs 106 source: /etc/ssl/certs/ca-certificates.crt 107 target: /etc/ssl/certs/ 108expose: 3000 109entrypoint: /app/apps/workflows/app