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 libsql:
16 fromImage:
17 path: oven/bun
18 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
19 label:
20 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
21 org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
22 workdir: /app/
23 copy:
24 - fromBuilder: docker
25 paths:
26 - /app/apps/build-docker/package.json
27 target: /app/package.json
28 run:
29 - bun install
30 build:
31 fromImage:
32 path: oven/bun
33 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
34 label:
35 org.opencontainers.image.stage: build
36 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
37 org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
38 workdir: /app/apps/workflows
39 env:
40 NODE_ENV: production
41 copy:
42 - paths:
43 - .
44 target: /app/
45 - fromBuilder: install
46 paths:
47 - /app/node_modules
48 target: /app/node_modules
49 run:
50 - bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app
51 docker:
52 fromImage:
53 path: oven/bun
54 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
55 label:
56 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
57 org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
58 workdir: /app/apps/workflows
59 copy:
60 - paths:
61 - .
62 target: /app/
63 run:
64 - bun run src/build-docker.ts
65 ca-certs:
66 fromImage:
67 path: debian
68 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
69 label:
70 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim
71 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
72 run:
73 - apt update && apt install -y ca-certificates && update-ca-certificates
74 install:
75 fromImage:
76 path: oven/bun
77 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
78 label:
79 org.opencontainers.image.stage: install
80 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
81 org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
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:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
137 label:
138 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus
139 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim
140 org.opencontainers.image.vendor: OpenStatus
141 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
142 org.opencontainers.image.title: OpenStatus Workflows
143 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
144 org.opencontainers.image.authors: OpenStatus Team
145 io.dofigen.version: 2.6.0
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:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
175 oven:
176 bun:
177 1.3.6:
178 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
179resources:
180 dofigen.yml:
181 hash: ef348ec787ab960110922454936b54cd60350bd6bc47879ae60e42f9a1db7c3d
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.6
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.6
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
246
247 docker:
248 fromImage: oven/bun:1.3.6
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.6
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