Openstatus www.openstatus.dev
at b4577f2e537d91b7369cd1bbd615cfb4730d8b2f 343 lines 12 kB view raw
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.stage: docker 22 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 23 workdir: /app/apps/workflows 24 copy: 25 - paths: 26 - . 27 target: /app/ 28 run: 29 - bun run src/build-docker.ts 30 libsql: 31 fromImage: 32 path: oven/bun 33 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 34 label: 35 org.opencontainers.image.stage: libsql 36 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3 37 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 38 workdir: /app/ 39 copy: 40 - fromBuilder: docker 41 paths: 42 - /app/apps/build-docker/package.json 43 target: /app/package.json 44 run: 45 - bun install 46 install: 47 fromImage: 48 path: oven/bun 49 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 50 label: 51 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 52 org.opencontainers.image.stage: install 53 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3 54 workdir: /app/ 55 run: 56 - bun install --production --frozen-lockfile --verbose 57 cache: 58 - target: /root/.bun/install/cache 59 bind: 60 - target: bunfig.toml 61 source: bunfig.toml 62 - target: package.json 63 source: package.json 64 - target: apps/workflows/package.json 65 source: apps/workflows/package.json 66 - target: packages/assertions/package.json 67 source: packages/assertions/package.json 68 - target: packages/db/package.json 69 source: packages/db/package.json 70 - target: packages/emails/package.json 71 source: packages/emails/package.json 72 - target: packages/notifications/discord/package.json 73 source: packages/notifications/discord/package.json 74 - target: packages/notifications/email/package.json 75 source: packages/notifications/email/package.json 76 - target: packages/notifications/ntfy/package.json 77 source: packages/notifications/ntfy/package.json 78 - target: packages/notifications/opsgenie/package.json 79 source: packages/notifications/opsgenie/package.json 80 - target: packages/notifications/pagerduty/package.json 81 source: packages/notifications/pagerduty/package.json 82 - target: packages/notifications/slack/package.json 83 source: packages/notifications/slack/package.json 84 - target: packages/notifications/twillio-sms/package.json 85 source: packages/notifications/twillio-sms/package.json 86 - target: packages/notifications/webhook/package.json 87 source: packages/notifications/webhook/package.json 88 - target: packages/regions/package.json 89 source: packages/regions/package.json 90 - target: packages/utils/package.json 91 source: packages/utils/package.json 92 - target: packages/tsconfig/package.json 93 source: packages/tsconfig/package.json 94 - target: packages/tinybird/package.json 95 source: packages/tinybird/package.json 96 - target: packages/upstash/package.json 97 source: packages/upstash/package.json 98 - target: packages/theme-store/package.json 99 source: packages/theme-store/package.json 100 ca-certs: 101 fromImage: 102 path: debian 103 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 104 label: 105 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 106 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim 107 org.opencontainers.image.stage: ca-certs 108 run: 109 - apt-get update && apt-get install -y --no-install-recommends ca-certificates && update-ca-certificates && rm -rf /var/lib/apt/lists/* 110 build: 111 fromImage: 112 path: oven/bun 113 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 114 label: 115 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 116 org.opencontainers.image.stage: build 117 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3 118 workdir: /app/apps/workflows 119 env: 120 NODE_ENV: production 121 copy: 122 - paths: 123 - . 124 target: /app/ 125 - fromBuilder: install 126 paths: 127 - /app/node_modules 128 target: /app/node_modules 129 run: 130 - bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql 131 fromImage: 132 path: debian 133 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 134 label: 135 io.dofigen.version: 2.5.1 136 org.opencontainers.image.vendor: OpenStatus 137 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim 138 org.opencontainers.image.authors: OpenStatus Team 139 org.opencontainers.image.title: OpenStatus Workflows 140 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 141 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus 142 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 143 user: 144 user: '1000' 145 group: '1000' 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: build 154 paths: 155 - /app/data 156 target: /app/data 157 - fromBuilder: libsql 158 paths: 159 - /app/node_modules 160 target: /app/packages/db/node_modules 161 - fromBuilder: libsql 162 paths: 163 - /app/node_modules 164 target: /app/node_modules 165 - fromBuilder: ca-certs 166 paths: 167 - /etc/ssl/certs/ca-certificates.crt 168 target: /etc/ssl/certs/ 169 root: 170 run: 171 - apt-get update 172 - apt-get install -y --no-install-recommends curl 173 - rm -rf /var/lib/apt/lists/* 174 entrypoint: 175 - /app/apps/workflows/app 176 expose: 177 - port: 3000 178 healthcheck: 179 cmd: curl -f http://localhost:3000/ping || exit 1 180 interval: 30s 181 timeout: 10s 182 start: 30s 183 retries: 3 184images: 185 docker.io: 186 oven: 187 bun: 188 1.3.3: 189 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 190 library: 191 debian: 192 bullseye-slim: 193 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 194resources: 195 dofigen.yml: 196 hash: 472e3606f77fb44e6ea0e59ab4cc632df9efaa6938fe3979197eebc12697b023 197 content: | 198 # Files to exclude from Docker context 199 ignore: 200 - node_modules 201 - /apps/docs 202 - /apps/screenshot-service 203 - /apps/server 204 - /apps/web 205 - /apps/dashboard 206 - /apps/status-page 207 - /packages/analytics 208 - /packages/api 209 - /packages/error 210 - /packages/tracker 211 212 builders: 213 # Stage 1: CA Certificates 214 ca-certs: 215 fromImage: debian:bullseye-slim 216 labels: 217 org.opencontainers.image.stage: ca-certs 218 run: apt-get update && apt-get install -y --no-install-recommends ca-certificates && update-ca-certificates && rm -rf /var/lib/apt/lists/* 219 220 # Stage 2: Docker-specific build artifacts (no dependencies) 221 docker: 222 fromImage: oven/bun:1.3.3 223 workdir: /app/apps/workflows 224 labels: 225 org.opencontainers.image.stage: docker 226 copy: 227 - . /app/ 228 run: bun run src/build-docker.ts 229 230 # Stage 3: Install production dependencies 231 install: 232 fromImage: oven/bun:1.3.3 233 workdir: /app/ 234 labels: 235 org.opencontainers.image.stage: install 236 bind: 237 - bunfig.toml 238 - package.json 239 - apps/workflows/package.json 240 - packages/assertions/package.json 241 - packages/db/package.json 242 - packages/emails/package.json 243 - packages/notifications/discord/package.json 244 - packages/notifications/email/package.json 245 - packages/notifications/ntfy/package.json 246 - packages/notifications/opsgenie/package.json 247 - packages/notifications/pagerduty/package.json 248 - packages/notifications/slack/package.json 249 - packages/notifications/twillio-sms/package.json 250 - packages/notifications/webhook/package.json 251 - packages/regions/package.json 252 - packages/utils/package.json 253 - packages/tsconfig/package.json 254 - packages/tinybird/package.json 255 - packages/upstash/package.json 256 - packages/theme-store/package.json 257 run: bun install --production --frozen-lockfile --verbose 258 cache: 259 - /root/.bun/install/cache 260 261 # Stage 4: Build application (compile to binary) 262 build: 263 fromImage: oven/bun:1.3.3 264 workdir: /app/apps/workflows 265 labels: 266 org.opencontainers.image.stage: build 267 env: 268 NODE_ENV: production 269 copy: 270 - . /app/ 271 - fromBuilder: install 272 source: /app/node_modules 273 target: /app/node_modules 274 # Should set env to production here 275 # Compile the TypeScript application 276 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql 277 278 # Stage 5: LibSQL dependencies 279 libsql: 280 fromImage: oven/bun:1.3.3 281 workdir: /app/ 282 labels: 283 org.opencontainers.image.stage: libsql 284 copy: 285 - fromBuilder: docker 286 source: /app/apps/build-docker/package.json 287 target: /app/package.json 288 run: bun install 289 290 # Runtime 291 fromImage: debian:bullseye-slim 292 workdir: /app/ 293 294 # Metadata labels 295 labels: 296 org.opencontainers.image.title: OpenStatus Workflows 297 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus 298 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 299 org.opencontainers.image.vendor: OpenStatus 300 org.opencontainers.image.authors: OpenStatus Team 301 302 # Copy artifacts from build stages 303 copy: 304 - fromBuilder: build 305 source: /app/apps/workflows/app 306 target: /app/apps/workflows/ 307 chmod: "555" 308 - fromBuilder: build 309 source: /app/data 310 target: /app/data 311 - fromBuilder: libsql 312 source: /app/node_modules 313 target: /app/packages/db/node_modules 314 - fromBuilder: libsql 315 source: /app/node_modules 316 target: /app/node_modules 317 - fromBuilder: ca-certs 318 source: /etc/ssl/certs/ca-certificates.crt 319 target: /etc/ssl/certs/ 320 321 # Install curl for health checks 322 root: 323 run: 324 - apt-get update 325 - apt-get install -y --no-install-recommends curl 326 - rm -rf /var/lib/apt/lists/* 327 328 # Security: run as non-root user 329 user: "1000:1000" 330 331 # Expose port 332 expose: "3000" 333 334 # Health check 335 healthcheck: 336 interval: 30s 337 timeout: 10s 338 start: 30s 339 retries: 3 340 cmd: curl -f http://localhost:3000/ping || exit 1 341 342 # Start application 343 entrypoint: /app/apps/workflows/app