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