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