Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ COPY \
--link \
"packages/status-fetcher/package.json" "/app/packages/status-fetcher/package.json"
RUN \
--mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
--mount=type=cache,target=/root/.local/share/pnpm/store,id=s/3a5c916e-f3f2-4f35-ba0e-3c8511b6f9a3-/root/.local/share/pnpm/store,sharing=locked \
<<EOF
corepack enable pnpm
pnpm install --prod --frozen-lockfile --filter=@openstatus/workflows... --verbose
Expand Down
90 changes: 48 additions & 42 deletions apps/workflows/dofigen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,14 @@ effective: |
- /packages/error
- /packages/tracker
builders:
build:
fromImage:
path: denoland/deno
digest: sha256:8d24854de78a79c56e74b49aa4c5996c60e1fe3730efba8fbdd2692c582e6e29
label:
org.opencontainers.image.stage: build
org.opencontainers.image.base.name: docker.io/denoland/deno:2.9.0
org.opencontainers.image.base.digest: sha256:8d24854de78a79c56e74b49aa4c5996c60e1fe3730efba8fbdd2692c582e6e29
workdir: /app/apps/workflows
env:
NODE_ENV: production
copy:
- paths:
- .
target: /app/
- fromBuilder: install
paths:
- /app/node_modules
target: /app/node_modules
- fromBuilder: install
paths:
- /app/apps/workflows/node_modules
target: /app/apps/workflows/node_modules
- fromBuilder: install
paths:
- /app/packages
target: /app/packages
run:
- mkdir -p /tmp/sc
- deno eval 'const p="/app/node_modules/.pnpm";const v=(x)=>{for(const e of Deno.readDirSync(p))if(e.name.startsWith(x+"@"))return e.name.slice(x.length+1).split("_")[0]};Deno.writeTextFileSync("/tmp/sc/package.json",JSON.stringify({dependencies:{"@libsql/client":v("@libsql+client"),libsql:v("libsql"),"@google-cloud/tasks":v("@google-cloud+tasks")}}))'
- cd /tmp/sc && deno install --node-modules-dir=auto --allow-scripts
- cd /app/apps/workflows && deno bundle --platform=deno --minify --sloppy-imports --node-modules-dir=manual --external '@libsql/client' --external 'libsql' --external '@google-cloud/tasks' --output /tmp/sc/_serve.bundle.mjs src/serve.ts
- cd /tmp/sc && deno compile --no-check -A --node-modules-dir=manual --output /app/apps/workflows/app /tmp/sc/_serve.bundle.mjs
- mkdir -p /app/data
install:
fromImage:
path: node
digest: sha256:b31e7a42fdf8b8aa5f5ed477c72d694301273f1069c5a2f71d53c6482e99a2fc
label:
org.opencontainers.image.base.digest: sha256:b31e7a42fdf8b8aa5f5ed477c72d694301273f1069c5a2f71d53c6482e99a2fc
org.opencontainers.image.stage: install
org.opencontainers.image.base.name: docker.io/node:24-slim
org.opencontainers.image.base.digest: sha256:b31e7a42fdf8b8aa5f5ed477c72d694301273f1069c5a2f71d53c6482e99a2fc
workdir: /app/
copy:
- paths:
Expand Down Expand Up @@ -156,20 +122,56 @@ effective: |
- corepack enable pnpm
- pnpm install --prod --frozen-lockfile --filter=@openstatus/workflows... --verbose
cache:
- target: /root/.local/share/pnpm/store
- id: s/3a5c916e-f3f2-4f35-ba0e-3c8511b6f9a3-/root/.local/share/pnpm/store
target: /root/.local/share/pnpm/store
sharing: locked
build:
fromImage:
path: denoland/deno
digest: sha256:8d24854de78a79c56e74b49aa4c5996c60e1fe3730efba8fbdd2692c582e6e29
label:
org.opencontainers.image.base.digest: sha256:8d24854de78a79c56e74b49aa4c5996c60e1fe3730efba8fbdd2692c582e6e29
org.opencontainers.image.stage: build
org.opencontainers.image.base.name: docker.io/denoland/deno:2.9.0
workdir: /app/apps/workflows
env:
NODE_ENV: production
copy:
- paths:
- .
target: /app/
- fromBuilder: install
paths:
- /app/node_modules
target: /app/node_modules
- fromBuilder: install
paths:
- /app/apps/workflows/node_modules
target: /app/apps/workflows/node_modules
- fromBuilder: install
paths:
- /app/packages
target: /app/packages
run:
- mkdir -p /tmp/sc
- deno eval 'const p="/app/node_modules/.pnpm";const v=(x)=>{for(const e of Deno.readDirSync(p))if(e.name.startsWith(x+"@"))return e.name.slice(x.length+1).split("_")[0]};Deno.writeTextFileSync("/tmp/sc/package.json",JSON.stringify({dependencies:{"@libsql/client":v("@libsql+client"),libsql:v("libsql"),"@google-cloud/tasks":v("@google-cloud+tasks")}}))'
- cd /tmp/sc && deno install --node-modules-dir=auto --allow-scripts
- cd /app/apps/workflows && deno bundle --platform=deno --minify --sloppy-imports --node-modules-dir=manual --external '@libsql/client' --external 'libsql' --external '@google-cloud/tasks' --output /tmp/sc/_serve.bundle.mjs src/serve.ts
- cd /tmp/sc && deno compile --no-check -A --node-modules-dir=manual --output /app/apps/workflows/app /tmp/sc/_serve.bundle.mjs
- mkdir -p /app/data
fromImage:
host: registry.access.redhat.com
port: 443
path: hi/curl
digest: sha256:848b81ab5d5e55371d7193fd4f1ea7b605d14dbb039344ffad34a4c1f0d880f4
label:
org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus
io.dofigen.version: 2.8.0
org.opencontainers.image.authors: OpenStatus Team
org.opencontainers.image.vendor: OpenStatus
org.opencontainers.image.title: OpenStatus Workflows
org.opencontainers.image.vendor: OpenStatus
org.opencontainers.image.authors: OpenStatus Team
org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
org.opencontainers.image.base.digest: sha256:848b81ab5d5e55371d7193fd4f1ea7b605d14dbb039344ffad34a4c1f0d880f4
org.opencontainers.image.description: Background job processing and probe scheduling for OpenStatus
io.dofigen.version: 2.8.0
user:
user: '1000'
group: '1000'
Expand Down Expand Up @@ -206,7 +208,7 @@ images:
digest: sha256:b31e7a42fdf8b8aa5f5ed477c72d694301273f1069c5a2f71d53c6482e99a2fc
resources:
dofigen.yml:
hash: 6e664d2b4d9649d3d56b5e2f244d826f1c4fc9f9633191d7ed38bae6ea4e12d2
hash: 416be0bdb8fcc1bc717f637b38cfa3b095b5277c947ad7e55d51b98194fdd856
content: |
ignore:
- node_modules
Expand Down Expand Up @@ -268,7 +270,11 @@ resources:
- corepack enable pnpm
- pnpm install --prod --frozen-lockfile --filter=@openstatus/workflows... --verbose
cache:
- /root/.local/share/pnpm/store
# Railway scopes cache mounts per service: the id must be literally
# s/<service-id>-<target> (env vars aren't allowed in the id).
- id: s/3a5c916e-f3f2-4f35-ba0e-3c8511b6f9a3-/root/.local/share/pnpm/store
target: /root/.local/share/pnpm/store
sharing: locked

# Stage 4: Build application (compile to binary with Deno)
build:
Expand Down
6 changes: 5 additions & 1 deletion apps/workflows/dofigen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ builders:
- corepack enable pnpm
- pnpm install --prod --frozen-lockfile --filter=@openstatus/workflows... --verbose
cache:
- /root/.local/share/pnpm/store
# Railway scopes cache mounts per service: the id must be literally
# s/<service-id>-<target> (env vars aren't allowed in the id).
- id: s/3a5c916e-f3f2-4f35-ba0e-3c8511b6f9a3-/root/.local/share/pnpm/store
target: /root/.local/share/pnpm/store
sharing: locked

# Stage 4: Build application (compile to binary with Deno)
build:
Expand Down
Loading