Openstatus
www.openstatus.dev
1effective: |
2 ignore:
3 - node_modules
4 - /apps/docs
5 - /apps/screenshot-service
6 - /apps/server
7 - /apps/web
8 - /apps/dashboard
9 - /apps/status-page
10 - /packages/analytics
11 - /packages/api
12 - /packages/error
13 - /packages/tracker
14 builders:
15 build:
16 fromImage:
17 path: oven/bun
18 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
19 label:
20 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3
21 org.opencontainers.image.stage: build
22 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
23 workdir: /app/apps/workflows
24 env:
25 NODE_ENV: production
26 copy:
27 - paths:
28 - .
29 target: /app/
30 - fromBuilder: install
31 paths:
32 - /app/node_modules
33 target: /app/node_modules
34 run:
35 - bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql
36 install:
37 fromImage:
38 path: oven/bun
39 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
40 label:
41 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3
42 org.opencontainers.image.stage: install
43 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
44 workdir: /app/
45 run:
46 - bun install --production --frozen-lockfile --verbose
47 cache:
48 - target: /root/.bun/install/cache
49 bind:
50 - target: bunfig.toml
51 source: bunfig.toml
52 - target: package.json
53 source: package.json
54 - target: apps/workflows/package.json
55 source: apps/workflows/package.json
56 - target: packages/assertions/package.json
57 source: packages/assertions/package.json
58 - target: packages/db/package.json
59 source: packages/db/package.json
60 - target: packages/emails/package.json
61 source: packages/emails/package.json
62 - target: packages/notifications/discord/package.json
63 source: packages/notifications/discord/package.json
64 - target: packages/notifications/email/package.json
65 source: packages/notifications/email/package.json
66 - target: packages/notifications/ntfy/package.json
67 source: packages/notifications/ntfy/package.json
68 - target: packages/notifications/opsgenie/package.json
69 source: packages/notifications/opsgenie/package.json
70 - target: packages/notifications/pagerduty/package.json
71 source: packages/notifications/pagerduty/package.json
72 - target: packages/notifications/slack/package.json
73 source: packages/notifications/slack/package.json
74 - target: packages/notifications/telegram/package.json
75 source: packages/notifications/telegram/package.json
76 - target: packages/notifications/twillio-sms/package.json
77 source: packages/notifications/twillio-sms/package.json
78 - target: packages/notifications/webhook/package.json
79 source: packages/notifications/webhook/package.json
80 - target: packages/regions/package.json
81 source: packages/regions/package.json
82 - target: packages/utils/package.json
83 source: packages/utils/package.json
84 - target: packages/tsconfig/package.json
85 source: packages/tsconfig/package.json
86 - target: packages/tinybird/package.json
87 source: packages/tinybird/package.json
88 - target: packages/upstash/package.json
89 source: packages/upstash/package.json
90 - target: packages/theme-store/package.json
91 source: packages/theme-store/package.json
92 docker:
93 fromImage:
94 path: oven/bun
95 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
96 label:
97 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3
98 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
99 workdir: /app/apps/workflows
100 copy:
101 - paths:
102 - .
103 target: /app/
104 run:
105 - bun run src/build-docker.ts
106 ca-certs:
107 fromImage:
108 path: debian
109 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
110 label:
111 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim
112 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
113 run:
114 - apt update && apt install -y ca-certificates && update-ca-certificates
115 libsql:
116 fromImage:
117 path: oven/bun
118 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
119 label:
120 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3
121 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
122 workdir: /app/
123 copy:
124 - fromBuilder: docker
125 paths:
126 - /app/apps/build-docker/package.json
127 target: /app/package.json
128 run:
129 - bun install
130 fromImage:
131 path: debian
132 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
133 label:
134 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
135 org.opencontainers.image.vendor: OpenStatus
136 org.opencontainers.image.title: OpenStatus Workflows
137 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim
138 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
139 org.opencontainers.image.authors: OpenStatus Team
140 io.dofigen.version: 2.5.1
141 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus
142 workdir: /app/
143 copy:
144 - fromBuilder: build
145 paths:
146 - /app/apps/workflows/app
147 target: /app/apps/workflows/
148 chmod: '555'
149 - fromBuilder: libsql
150 paths:
151 - /app/node_modules
152 target: /app/packages/db/node_modules
153 - fromBuilder: libsql
154 paths:
155 - /app/node_modules
156 target: /app/node_modules
157 - fromBuilder: ca-certs
158 paths:
159 - /etc/ssl/certs/ca-certificates.crt
160 target: /etc/ssl/certs/
161 entrypoint:
162 - /app/apps/workflows/app
163 expose:
164 - port: 3000
165images:
166 docker.io:
167 oven:
168 bun:
169 1.3.3:
170 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
171 library:
172 debian:
173 bullseye-slim:
174 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
175resources:
176 dofigen.yml:
177 hash: 297382ef47be04c67f610380fadff8e2b9333ab28594ff6e0512b75a23d4c3b0
178 content: |
179 ignore:
180 - node_modules
181 - /apps/docs
182 - /apps/screenshot-service
183 - /apps/server
184 - /apps/web
185 - /apps/dashboard
186 - /apps/status-page
187 - /packages/analytics
188 - /packages/api
189 - /packages/error
190 - /packages/tracker
191 builders:
192 install:
193 fromImage: oven/bun:1.3.3
194 workdir: /app/
195 labels:
196 org.opencontainers.image.stage: install
197 bind:
198 - bunfig.toml
199 - package.json
200 - apps/workflows/package.json
201 - packages/assertions/package.json
202 - packages/db/package.json
203 - packages/emails/package.json
204 - packages/notifications/discord/package.json
205 - packages/notifications/email/package.json
206 - packages/notifications/ntfy/package.json
207 - packages/notifications/opsgenie/package.json
208 - packages/notifications/pagerduty/package.json
209 - packages/notifications/slack/package.json
210 - packages/notifications/telegram/package.json
211 - packages/notifications/twillio-sms/package.json
212 - packages/notifications/webhook/package.json
213 - packages/regions/package.json
214 - packages/utils/package.json
215 - packages/tsconfig/package.json
216 - packages/tinybird/package.json
217 - packages/upstash/package.json
218 - packages/theme-store/package.json
219 # Install dependencies
220 run: bun install --production --frozen-lockfile --verbose
221 cache:
222 - /root/.bun/install/cache
223
224 # Stage 4: Build application (compile to binary)
225 build:
226 fromImage: oven/bun:1.3.3
227 workdir: /app/apps/workflows
228 labels:
229 org.opencontainers.image.stage: build
230 copy:
231 - . /app/
232 - fromBuilder: install
233 source: /app/node_modules
234 target: /app/node_modules
235 # Should set env to production here
236 # Compile the TypeScript application
237 env:
238 NODE_ENV: production
239 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql
240
241 docker:
242 fromImage: oven/bun:1.3.3
243 workdir: /app/apps/workflows
244 copy:
245 - . /app/
246 run: bun run src/build-docker.ts
247
248 libsql:
249 fromImage: oven/bun:1.3.3
250 workdir: /app/
251 copy:
252 - fromBuilder: docker
253 source: /app/apps/build-docker/package.json
254 target: /app/package.json
255 run: bun install
256
257 ca-certs:
258 fromImage: debian:bullseye-slim
259 run: apt update && apt install -y ca-certificates && update-ca-certificates
260
261 fromImage: debian:bullseye-slim
262 workdir: /app/
263
264 # Metadata labels
265 labels:
266 org.opencontainers.image.title: OpenStatus Workflows
267 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus
268 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
269 org.opencontainers.image.vendor: OpenStatus
270 org.opencontainers.image.authors: OpenStatus Team
271
272 # Copy artifacts from build stages
273 copy:
274 - fromBuilder: build
275 source: /app/apps/workflows/app
276 target: /app/apps/workflows/
277 chmod: "555"
278 - fromBuilder: libsql
279 source: /app/node_modules
280 target: /app/packages/db/node_modules
281 - fromBuilder: libsql
282 source: /app/node_modules
283 target: /app/node_modules
284 - fromBuilder: ca-certs
285 source: /etc/ssl/certs/ca-certificates.crt
286 target: /etc/ssl/certs/
287 expose: 3000
288 entrypoint: /app/apps/workflows/app