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