Openstatus www.openstatus.dev

fix workflow (#1713)

authored by

Thibault Le Ouay and committed by
GitHub
dbacbdaf 17ab52ca

+99 -139
+27 -21
apps/workflows/Dockerfile
··· 9 org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" 10 RUN apt update && apt install -y ca-certificates && update-ca-certificates 11 12 # install 13 FROM oven/bun@sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 AS install 14 LABEL \ ··· 60 "/app/node_modules" "/app/node_modules" 61 RUN bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 62 63 # runtime 64 FROM debian@sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b AS runtime 65 LABEL \ ··· 79 --link \ 80 "/app/apps/workflows/app" "/app/apps/workflows/" 81 COPY \ 82 - --from=build \ 83 - --chown=1000:1000 \ 84 - --link \ 85 - "/app/packages/db" "/app/packages/db/" 86 - COPY \ 87 - --chown=1000:1000 \ 88 - --chmod=755 \ 89 - --link \ 90 - "apps/workflows/start.sh" "/app/start.sh" 91 - COPY \ 92 - --from=build \ 93 --chown=1000:1000 \ 94 - --chmod=755 \ 95 --link \ 96 - "/usr/local/bin/bun" "/usr/local/bin/bun" 97 COPY \ 98 - --from=install \ 99 --chown=1000:1000 \ 100 --link \ 101 "/app/node_modules" "/app/node_modules" ··· 104 --chown=1000:1000 \ 105 --link \ 106 "/etc/ssl/certs/ca-certificates.crt" "/etc/ssl/certs/" 107 - USER 0:0 108 - RUN <<EOF 109 - apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* 110 - mkdir -p /app/data 111 - chown -R 1000:1000 /app/data 112 - EOF 113 USER 1000:1000 114 EXPOSE 3000 115 - ENTRYPOINT ["/bin/sh", "/app/start.sh"]
··· 9 org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" 10 RUN apt update && apt install -y ca-certificates && update-ca-certificates 11 12 + # docker 13 + FROM oven/bun@sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 AS docker 14 + LABEL \ 15 + org.opencontainers.image.base.digest="sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3" \ 16 + org.opencontainers.image.base.name="docker.io/oven/bun:1.3.5" 17 + WORKDIR /app/apps/workflows 18 + COPY \ 19 + --link \ 20 + "." "/app/" 21 + RUN bun run src/build-docker.ts 22 + 23 # install 24 FROM oven/bun@sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 AS install 25 LABEL \ ··· 71 "/app/node_modules" "/app/node_modules" 72 RUN bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 73 74 + # libsql 75 + FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS libsql 76 + LABEL \ 77 + org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ 78 + org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" 79 + WORKDIR /app/ 80 + COPY \ 81 + --from=docker \ 82 + --link \ 83 + "/app/apps/build-docker/package.json" "/app/package.json" 84 + RUN bun install 85 + 86 # runtime 87 FROM debian@sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b AS runtime 88 LABEL \ ··· 102 --link \ 103 "/app/apps/workflows/app" "/app/apps/workflows/" 104 COPY \ 105 + --from=libsql \ 106 --chown=1000:1000 \ 107 --link \ 108 + "/app/node_modules" "/app/packages/db/node_modules" 109 COPY \ 110 + --from=libsql \ 111 --chown=1000:1000 \ 112 --link \ 113 "/app/node_modules" "/app/node_modules" ··· 116 --chown=1000:1000 \ 117 --link \ 118 "/etc/ssl/certs/ca-certificates.crt" "/etc/ssl/certs/" 119 USER 1000:1000 120 EXPOSE 3000 121 + ENTRYPOINT ["/app/apps/workflows/app"]
+51 -99
apps/workflows/dofigen.lock
··· 12 - /packages/error 13 - /packages/tracker 14 builders: 15 - build: 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: build 22 - org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 23 workdir: /app/apps/workflows 24 - env: 25 - NODE_ENV: production 26 copy: 27 - paths: 28 - . 29 target: /app/ 30 - - fromBuilder: install 31 - paths: 32 - - /app/node_modules 33 - target: /app/node_modules 34 run: 35 - - bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql 36 ca-certs: 37 fromImage: 38 path: debian ··· 47 path: oven/bun 48 digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 49 label: 50 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.5 51 org.opencontainers.image.stage: install 52 - org.opencontainers.image.base.digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 53 workdir: /app/ 54 run: 55 - bun install --production --frozen-lockfile --verbose ··· 102 source: packages/upstash/package.json 103 - target: packages/theme-store/package.json 104 source: packages/theme-store/package.json 105 - libsql: 106 - fromImage: 107 - path: oven/bun 108 - digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 109 - label: 110 - org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 111 - org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3 112 - workdir: /app/ 113 - copy: 114 - - fromBuilder: docker 115 - paths: 116 - - /app/apps/build-docker/package.json 117 - target: /app/package.json 118 - run: 119 - - bun install 120 - docker: 121 - fromImage: 122 - path: oven/bun 123 - digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 124 - label: 125 - org.opencontainers.image.base.digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 126 - org.opencontainers.image.base.name: docker.io/oven/bun:1.3.5 127 - workdir: /app/apps/workflows 128 - copy: 129 - - paths: 130 - - . 131 - target: /app/ 132 - run: 133 - - bun run src/build-docker.ts 134 build: 135 fromImage: 136 path: oven/bun ··· 152 target: /app/node_modules 153 run: 154 - bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 155 - ca-certs: 156 fromImage: 157 - path: debian 158 - digest: sha256:c5f48c942c667e70d7e64b124cfc939c25a4a43207c0d14b45844d762dc1d50f 159 label: 160 - org.opencontainers.image.base.name: docker.io/debian:bullseye-slim 161 - org.opencontainers.image.base.digest: sha256:c5f48c942c667e70d7e64b124cfc939c25a4a43207c0d14b45844d762dc1d50f 162 run: 163 - - apt update && apt install -y ca-certificates && update-ca-certificates 164 fromImage: 165 path: debian 166 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 167 label: 168 - org.opencontainers.image.base.name: docker.io/debian:bullseye-slim 169 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 170 - org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 171 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus 172 - org.opencontainers.image.authors: OpenStatus Team 173 org.opencontainers.image.title: OpenStatus Workflows 174 - org.opencontainers.image.vendor: OpenStatus 175 - org.opencontainers.image.authors: OpenStatus Team 176 io.dofigen.version: 2.6.0 177 workdir: /app/ 178 copy: 179 - fromBuilder: build ··· 181 - /app/apps/workflows/app 182 target: /app/apps/workflows/ 183 chmod: '555' 184 - - fromBuilder: build 185 - paths: 186 - - /app/packages/db 187 - target: /app/packages/db/ 188 - - paths: 189 - - apps/workflows/start.sh 190 - target: /app/start.sh 191 - chmod: '755' 192 - - fromBuilder: build 193 paths: 194 - - /usr/local/bin/bun 195 - target: /usr/local/bin/bun 196 - chmod: '755' 197 - - fromBuilder: install 198 paths: 199 - /app/node_modules 200 target: /app/node_modules ··· 202 paths: 203 - /etc/ssl/certs/ca-certificates.crt 204 target: /etc/ssl/certs/ 205 - root: 206 - run: 207 - - apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* 208 - - mkdir -p /app/data 209 - - chown -R 1000:1000 /app/data 210 entrypoint: 211 - - /bin/sh 212 - - /app/start.sh 213 expose: 214 - port: 3000 215 images: 216 docker.io: 217 - oven: 218 - bun: 219 - 1.3.5: 220 - digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 221 - 1.3.3: 222 - digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 223 library: 224 debian: 225 bullseye-slim: ··· 228 bun: 229 1.3.3: 230 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 231 resources: 232 dofigen.yml: 233 - hash: a0ad1a5bb9b6026553537d163c77052133cbd7231927105febf9c2e86500ca3c 234 content: | 235 ignore: 236 - node_modules ··· 296 NODE_ENV: production 297 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 298 299 ca-certs: 300 fromImage: debian:bullseye-slim 301 run: apt update && apt install -y ca-certificates && update-ca-certificates ··· 311 org.opencontainers.image.vendor: OpenStatus 312 org.opencontainers.image.authors: OpenStatus Team 313 314 - # Create data directory and install curl as root before switching to user 1000 315 - root: 316 - run: 317 - - apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* 318 - - mkdir -p /app/data 319 - - chown -R 1000:1000 /app/data 320 - 321 # Copy artifacts from build stages 322 copy: 323 - fromBuilder: build 324 source: /app/apps/workflows/app 325 target: /app/apps/workflows/ 326 chmod: "555" 327 - - fromBuilder: build 328 - source: /app/packages/db 329 - target: /app/packages/db/ 330 - - source: apps/workflows/start.sh 331 - target: /app/start.sh 332 - chmod: "755" 333 - - fromBuilder: build 334 - source: /usr/local/bin/bun 335 - target: /usr/local/bin/bun 336 - chmod: "755" 337 - - fromBuilder: install 338 source: /app/node_modules 339 target: /app/node_modules 340 - fromBuilder: ca-certs 341 source: /etc/ssl/certs/ca-certificates.crt 342 target: /etc/ssl/certs/ 343 expose: "3000" 344 - entrypoint: ["/bin/sh", "/app/start.sh"]
··· 12 - /packages/error 13 - /packages/tracker 14 builders: 15 + docker: 16 fromImage: 17 path: oven/bun 18 + digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 19 label: 20 + org.opencontainers.image.base.name: docker.io/oven/bun:1.3.5 21 + org.opencontainers.image.base.digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 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 ··· 40 path: oven/bun 41 digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 42 label: 43 + org.opencontainers.image.base.digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 44 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.5 45 org.opencontainers.image.stage: install 46 workdir: /app/ 47 run: 48 - bun install --production --frozen-lockfile --verbose ··· 95 source: packages/upstash/package.json 96 - target: packages/theme-store/package.json 97 source: packages/theme-store/package.json 98 build: 99 fromImage: 100 path: oven/bun ··· 116 target: /app/node_modules 117 run: 118 - bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 119 + libsql: 120 fromImage: 121 + path: oven/bun 122 + digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 123 label: 124 + org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3 125 + org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 126 + workdir: /app/ 127 + copy: 128 + - fromBuilder: docker 129 + paths: 130 + - /app/apps/build-docker/package.json 131 + target: /app/package.json 132 run: 133 + - bun install 134 fromImage: 135 path: debian 136 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 137 label: 138 + org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 139 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b 140 org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus 141 + org.opencontainers.image.vendor: OpenStatus 142 + org.opencontainers.image.base.name: docker.io/debian:bullseye-slim 143 org.opencontainers.image.title: OpenStatus Workflows 144 io.dofigen.version: 2.6.0 145 + org.opencontainers.image.authors: OpenStatus Team 146 workdir: /app/ 147 copy: 148 - fromBuilder: build ··· 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 ··· 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 169 images: 170 docker.io: 171 library: 172 debian: 173 bullseye-slim: ··· 176 bun: 177 1.3.3: 178 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 179 + 1.3.5: 180 + digest: sha256:e90cdbaf9ccdb3d4bd693aa335c3310a6004286a880f62f79b18f9b1312a8ec3 181 resources: 182 dofigen.yml: 183 + hash: 31cef4b70fa33ceb4b9b38f32c98ff13646d0f494bfb79c22734d22b67e9a1d8 184 content: | 185 ignore: 186 - node_modules ··· 246 NODE_ENV: production 247 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 248 249 + docker: 250 + fromImage: oven/bun:1.3.5 251 + workdir: /app/apps/workflows 252 + copy: 253 + - . /app/ 254 + run: bun run src/build-docker.ts 255 + 256 + libsql: 257 + fromImage: oven/bun:1.3.3 258 + workdir: /app/ 259 + copy: 260 + - fromBuilder: docker 261 + source: /app/apps/build-docker/package.json 262 + target: /app/package.json 263 + run: bun install 264 + 265 ca-certs: 266 fromImage: debian:bullseye-slim 267 run: apt update && apt install -y ca-certificates && update-ca-certificates ··· 277 org.opencontainers.image.vendor: OpenStatus 278 org.opencontainers.image.authors: OpenStatus Team 279 280 # Copy artifacts from build stages 281 copy: 282 - fromBuilder: build 283 source: /app/apps/workflows/app 284 target: /app/apps/workflows/ 285 chmod: "555" 286 + - fromBuilder: libsql 287 + source: /app/node_modules 288 + target: /app/packages/db/node_modules 289 + - fromBuilder: libsql 290 source: /app/node_modules 291 target: /app/node_modules 292 - fromBuilder: ca-certs 293 source: /etc/ssl/certs/ca-certificates.crt 294 target: /etc/ssl/certs/ 295 expose: "3000" 296 + entrypoint: /app/apps/workflows/app
+21 -19
apps/workflows/dofigen.yml
··· 62 NODE_ENV: production 63 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 64 65 ca-certs: 66 fromImage: debian:bullseye-slim 67 run: apt update && apt install -y ca-certificates && update-ca-certificates ··· 77 org.opencontainers.image.vendor: OpenStatus 78 org.opencontainers.image.authors: OpenStatus Team 79 80 - # Create data directory and install curl as root before switching to user 1000 81 - root: 82 - run: 83 - - apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* 84 - - mkdir -p /app/data 85 - - chown -R 1000:1000 /app/data 86 - 87 # Copy artifacts from build stages 88 copy: 89 - fromBuilder: build 90 source: /app/apps/workflows/app 91 target: /app/apps/workflows/ 92 chmod: "555" 93 - - fromBuilder: build 94 - source: /app/packages/db 95 - target: /app/packages/db/ 96 - - source: apps/workflows/start.sh 97 - target: /app/start.sh 98 - chmod: "755" 99 - - fromBuilder: build 100 - source: /usr/local/bin/bun 101 - target: /usr/local/bin/bun 102 - chmod: "755" 103 - - fromBuilder: install 104 source: /app/node_modules 105 target: /app/node_modules 106 - fromBuilder: ca-certs 107 source: /etc/ssl/certs/ca-certificates.crt 108 target: /etc/ssl/certs/ 109 expose: "3000" 110 - entrypoint: ["/bin/sh", "/app/start.sh"]
··· 62 NODE_ENV: production 63 run: bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app 64 65 + docker: 66 + fromImage: oven/bun:1.3.5 67 + workdir: /app/apps/workflows 68 + copy: 69 + - . /app/ 70 + run: bun run src/build-docker.ts 71 + 72 + libsql: 73 + fromImage: oven/bun:1.3.3 74 + workdir: /app/ 75 + copy: 76 + - fromBuilder: docker 77 + source: /app/apps/build-docker/package.json 78 + target: /app/package.json 79 + run: bun install 80 + 81 ca-certs: 82 fromImage: debian:bullseye-slim 83 run: apt update && apt install -y ca-certificates && update-ca-certificates ··· 93 org.opencontainers.image.vendor: OpenStatus 94 org.opencontainers.image.authors: OpenStatus Team 95 96 # Copy artifacts from build stages 97 copy: 98 - fromBuilder: build 99 source: /app/apps/workflows/app 100 target: /app/apps/workflows/ 101 chmod: "555" 102 + - fromBuilder: libsql 103 + source: /app/node_modules 104 + target: /app/packages/db/node_modules 105 + - fromBuilder: libsql 106 source: /app/node_modules 107 target: /app/node_modules 108 - fromBuilder: ca-certs 109 source: /etc/ssl/certs/ca-certificates.crt 110 target: /etc/ssl/certs/ 111 expose: "3000" 112 + entrypoint: /app/apps/workflows/app