Openstatus
www.openstatus.dev
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.6
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/base/package.json
27 - packages/notifications/discord/package.json
28 - packages/notifications/email/package.json
29 - packages/notifications/google-chat/package.json
30 - packages/notifications/ntfy/package.json
31 - packages/notifications/opsgenie/package.json
32 - packages/notifications/pagerduty/package.json
33 - packages/notifications/slack/package.json
34 - packages/notifications/telegram/package.json
35 - packages/notifications/twillio-whatsapp/package.json
36 - packages/notifications/twillio-sms/package.json
37 - packages/notifications/webhook/package.json
38 - packages/regions/package.json
39 - packages/utils/package.json
40 - packages/tsconfig/package.json
41 - packages/tinybird/package.json
42 - packages/upstash/package.json
43 - packages/theme-store/package.json
44 # Install dependencies
45 run: bun install --production --frozen-lockfile --verbose
46 cache:
47 - /root/.bun/install/cache
48
49 # Stage 4: Build application (compile to binary)
50 build:
51 fromImage: oven/bun:1.3.6
52 workdir: /app/apps/workflows
53 labels:
54 org.opencontainers.image.stage: build
55 copy:
56 - . /app/
57 - fromBuilder: install
58 source: /app/node_modules
59 target: /app/node_modules
60 # Should set env to production here
61 # Compile the TypeScript application
62 env:
63 NODE_ENV: production
64 run: bun build --compile --target bun --sourcemap src/index.ts --outfile=app
65
66 docker:
67 fromImage: oven/bun:1.3.6
68 workdir: /app/apps/workflows
69 copy:
70 - . /app/
71 run: bun run src/build-docker.ts
72
73 libsql:
74 fromImage: oven/bun:1.3.6
75 workdir: /app/
76 copy:
77 - fromBuilder: docker
78 source: /app/apps/build-docker/package.json
79 target: /app/package.json
80 run: bun install
81
82 ca-certs:
83 fromImage: debian:bullseye-slim
84 run: apt update && apt install -y ca-certificates curl && update-ca-certificates
85
86fromImage: debian:bullseye-slim
87workdir: /app/
88
89# Metadata labels
90labels:
91 org.opencontainers.image.title: OpenStatus Workflows
92 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus
93 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
94 org.opencontainers.image.vendor: OpenStatus
95 org.opencontainers.image.authors: OpenStatus Team
96
97# Copy artifacts from build stages
98copy:
99 - fromBuilder: build
100 source: /app/apps/workflows/app
101 target: /app/apps/workflows/
102 chmod: "555"
103 - fromBuilder: libsql
104 source: /app/node_modules
105 target: /app/packages/db/node_modules
106 - fromBuilder: libsql
107 source: /app/node_modules
108 target: /app/node_modules
109 - fromBuilder: ca-certs
110 source: /etc/ssl/certs/ca-certificates.crt
111 target: /etc/ssl/certs/
112 - fromBuilder: ca-certs
113 source: /usr/bin/curl
114 target: /usr/bin/curl
115expose: "3000"
116
117entrypoint: /app/apps/workflows/app