Skip to content

Commit 95d7ca6

Browse files
update branch
2 parents 6e5d225 + 0e1fa59 commit 95d7ca6

15 files changed

Lines changed: 295 additions & 131 deletions

File tree

.github/workflows/deploy-workflows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- "packages/utils/**"
1111
- "packages/tsconfig/**"
1212
- "packages/notifications/**"
13+
- "pnpm-workspace.yaml"
1314
jobs:
1415
deploy-workflows:
1516
name: Deploy Workflows

apps/server/.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is generated by Dofigen v2.6.0
1+
# This file is generated by Dofigen v2.8.0
22
# See https://github.com/lenra-io/dofigen
33

44
node_modules

apps/server/Dockerfile

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# syntax=docker/dockerfile:1.19.0
2-
# This file is generated by Dofigen v2.6.0
2+
# This file is generated by Dofigen v2.8.0
33
# See https://github.com/lenra-io/dofigen
44

55
# install
6-
FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS install
6+
FROM node@sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf AS install
77
LABEL \
8-
org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \
9-
org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" \
8+
org.opencontainers.image.base.digest="sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf" \
9+
org.opencontainers.image.base.name="docker.io/node:24-slim" \
1010
org.opencontainers.image.stage="install"
1111
WORKDIR /app/
1212
RUN \
13-
--mount=type=bind,target=bunfig.toml,source=bunfig.toml \
13+
--mount=type=bind,target=pnpm-workspace.yaml,source=pnpm-workspace.yaml \
14+
--mount=type=bind,target=pnpm-lock.yaml,source=pnpm-lock.yaml \
15+
--mount=type=bind,target=patches,source=patches \
1416
--mount=type=bind,target=package.json,source=package.json \
1517
--mount=type=bind,target=apps/server/package.json,source=apps/server/package.json \
1618
--mount=type=bind,target=packages/analytics/package.json,source=packages/analytics/package.json \
@@ -44,8 +46,11 @@ RUN \
4446
--mount=type=bind,target=packages/locales/package.json,source=packages/locales/package.json \
4547
--mount=type=bind,target=packages/services/package.json,source=packages/services/package.json \
4648
--mount=type=bind,target=packages/importers/package.json,source=packages/importers/package.json \
47-
--mount=type=cache,target=/root/.bun/install/cache,sharing=locked \
48-
bun install --production --frozen-lockfile --verbose
49+
--mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
50+
<<EOF
51+
corepack enable pnpm
52+
pnpm install --prod --frozen-lockfile --verbose
53+
EOF
4954

5055
# build
5156
FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS build
@@ -62,14 +67,22 @@ COPY \
6267
--from=install \
6368
--link \
6469
"/app/node_modules" "/app/node_modules"
70+
COPY \
71+
--from=install \
72+
--link \
73+
"/app/apps/server/node_modules" "/app/apps/server/node_modules"
74+
COPY \
75+
--from=install \
76+
--link \
77+
"/app/packages" "/app/packages"
6578
RUN bun build --compile --sourcemap src/index.ts --outfile=app
6679

6780
# runtime
68-
FROM debian@sha256:1a4701c321b1d28b1ff5f0230e766791e4b79b1d4c6c7a70064f4b297b1a330f AS runtime
81+
FROM debian@sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604 AS runtime
6982
LABEL \
70-
io.dofigen.version="2.6.0" \
83+
io.dofigen.version="2.8.0" \
7184
org.opencontainers.image.authors="OpenStatus Team" \
72-
org.opencontainers.image.base.digest="sha256:1a4701c321b1d28b1ff5f0230e766791e4b79b1d4c6c7a70064f4b297b1a330f" \
85+
org.opencontainers.image.base.digest="sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604" \
7386
org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \
7487
org.opencontainers.image.description="REST API server with Hono framework for OpenStatus" \
7588
org.opencontainers.image.source="https://github.com/openstatusHQ/openstatus" \

apps/server/dofigen.lock

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@ effective: |
1212
builders:
1313
install:
1414
fromImage:
15-
path: oven/bun
16-
digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
15+
path: node
16+
digest: sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf
1717
label:
18-
org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
18+
org.opencontainers.image.base.name: docker.io/node:24-slim
19+
org.opencontainers.image.base.digest: sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf
1920
org.opencontainers.image.stage: install
20-
org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
2121
workdir: /app/
2222
run:
23-
- bun install --production --frozen-lockfile --verbose
23+
- corepack enable pnpm
24+
- pnpm install --prod --frozen-lockfile --verbose
2425
cache:
25-
- target: /root/.bun/install/cache
26+
- target: /root/.local/share/pnpm/store
2627
bind:
27-
- target: bunfig.toml
28-
source: bunfig.toml
28+
- target: pnpm-workspace.yaml
29+
source: pnpm-workspace.yaml
30+
- target: pnpm-lock.yaml
31+
source: pnpm-lock.yaml
32+
- target: patches
33+
source: patches
2934
- target: package.json
3035
source: package.json
3136
- target: apps/server/package.json
@@ -97,9 +102,9 @@ effective: |
97102
path: oven/bun
98103
digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
99104
label:
100-
org.opencontainers.image.stage: build
101-
org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
102105
org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
106+
org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6
107+
org.opencontainers.image.stage: build
103108
workdir: /app/apps/server
104109
env:
105110
NODE_ENV: production
@@ -111,20 +116,28 @@ effective: |
111116
paths:
112117
- /app/node_modules
113118
target: /app/node_modules
119+
- fromBuilder: install
120+
paths:
121+
- /app/apps/server/node_modules
122+
target: /app/apps/server/node_modules
123+
- fromBuilder: install
124+
paths:
125+
- /app/packages
126+
target: /app/packages
114127
run:
115128
- bun build --compile --sourcemap src/index.ts --outfile=app
116129
fromImage:
117130
path: debian
118-
digest: sha256:1a4701c321b1d28b1ff5f0230e766791e4b79b1d4c6c7a70064f4b297b1a330f
131+
digest: sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604
119132
label:
120-
org.opencontainers.image.title: OpenStatus Server
133+
org.opencontainers.image.authors: OpenStatus Team
121134
org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
135+
io.dofigen.version: 2.8.0
136+
org.opencontainers.image.description: REST API server with Hono framework for OpenStatus
122137
org.opencontainers.image.base.name: docker.io/debian:bullseye-slim
123-
org.opencontainers.image.authors: OpenStatus Team
124-
io.dofigen.version: 2.6.0
125-
org.opencontainers.image.base.digest: sha256:1a4701c321b1d28b1ff5f0230e766791e4b79b1d4c6c7a70064f4b297b1a330f
138+
org.opencontainers.image.base.digest: sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604
139+
org.opencontainers.image.title: OpenStatus Server
126140
org.opencontainers.image.vendor: OpenStatus
127-
org.opencontainers.image.description: REST API server with Hono framework for OpenStatus
128141
user:
129142
user: '1000'
130143
group: '1000'
@@ -151,17 +164,20 @@ effective: |
151164
retries: 3
152165
images:
153166
docker.io:
154-
library:
155-
debian:
156-
bullseye-slim:
157-
digest: sha256:1a4701c321b1d28b1ff5f0230e766791e4b79b1d4c6c7a70064f4b297b1a330f
158167
oven:
159168
bun:
160169
1.3.6:
161170
digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a
171+
library:
172+
debian:
173+
bullseye-slim:
174+
digest: sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604
175+
node:
176+
24-slim:
177+
digest: sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf
162178
resources:
163179
dofigen.yml:
164-
hash: c9490c75001074e3e201504aa5b4251e3e96ba6648b5512dfbaf497e56a57cbc
180+
hash: ced0248a6d50292b50f230ddb23b143b32a255a3ecc744ede63995b7921d643e
165181
content: |
166182
# Files to exclude from Docker context
167183
ignore:
@@ -178,12 +194,14 @@ resources:
178194
builders:
179195
# Stage 1: Install production dependencies
180196
install:
181-
fromImage: oven/bun:1.3.6
197+
fromImage: node:24-slim
182198
workdir: /app/
183199
labels:
184200
org.opencontainers.image.stage: install
185201
bind:
186-
- bunfig.toml
202+
- pnpm-workspace.yaml
203+
- pnpm-lock.yaml
204+
- patches
187205
- package.json
188206
- apps/server/package.json
189207
- packages/analytics/package.json
@@ -217,9 +235,11 @@ resources:
217235
- packages/locales/package.json
218236
- packages/services/package.json
219237
- packages/importers/package.json
220-
run: bun install --production --frozen-lockfile --verbose
238+
run:
239+
- corepack enable pnpm
240+
- pnpm install --prod --frozen-lockfile --verbose
221241
cache:
222-
- /root/.bun/install/cache
242+
- /root/.local/share/pnpm/store
223243

224244
# Stage 2: Build application (compile to binary)
225245
build:
@@ -234,6 +254,12 @@ resources:
234254
- fromBuilder: install
235255
source: /app/node_modules
236256
target: /app/node_modules
257+
- fromBuilder: install
258+
source: /app/apps/server/node_modules
259+
target: /app/apps/server/node_modules
260+
- fromBuilder: install
261+
source: /app/packages
262+
target: /app/packages
237263
run: bun build --compile --sourcemap src/index.ts --outfile=app
238264

239265
# Runtime stage

apps/server/dofigen.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ ignore:
1313
builders:
1414
# Stage 1: Install production dependencies
1515
install:
16-
fromImage: oven/bun:1.3.6
16+
fromImage: node:24-slim
1717
workdir: /app/
1818
labels:
1919
org.opencontainers.image.stage: install
2020
bind:
21-
- bunfig.toml
21+
- pnpm-workspace.yaml
22+
- pnpm-lock.yaml
23+
- patches
2224
- package.json
2325
- apps/server/package.json
2426
- packages/analytics/package.json
@@ -52,9 +54,11 @@ builders:
5254
- packages/locales/package.json
5355
- packages/services/package.json
5456
- packages/importers/package.json
55-
run: bun install --production --frozen-lockfile --verbose
57+
run:
58+
- corepack enable pnpm
59+
- pnpm install --prod --frozen-lockfile --verbose
5660
cache:
57-
- /root/.bun/install/cache
61+
- /root/.local/share/pnpm/store
5862

5963
# Stage 2: Build application (compile to binary)
6064
build:
@@ -69,6 +73,12 @@ builders:
6973
- fromBuilder: install
7074
source: /app/node_modules
7175
target: /app/node_modules
76+
- fromBuilder: install
77+
source: /app/apps/server/node_modules
78+
target: /app/apps/server/node_modules
79+
- fromBuilder: install
80+
source: /app/packages
81+
target: /app/packages
7282
run: bun build --compile --sourcemap src/index.ts --outfile=app
7383

7484
# Runtime stage

apps/workflows/.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is generated by Dofigen v2.6.0
1+
# This file is generated by Dofigen v2.8.0
22
# See https://github.com/lenra-io/dofigen
33

44
node_modules

apps/workflows/Dockerfile

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1.19.0
2-
# This file is generated by Dofigen v2.6.0
2+
# This file is generated by Dofigen v2.8.0
33
# See https://github.com/lenra-io/dofigen
44

55
# docker
@@ -14,14 +14,16 @@ COPY \
1414
RUN bun run src/build-docker.ts
1515

1616
# install
17-
FROM oven/bun@sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7 AS install
17+
FROM node@sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf AS install
1818
LABEL \
19-
org.opencontainers.image.base.digest="sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7" \
20-
org.opencontainers.image.base.name="docker.io/oven/bun:1.3.11" \
19+
org.opencontainers.image.base.digest="sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf" \
20+
org.opencontainers.image.base.name="docker.io/node:24-slim" \
2121
org.opencontainers.image.stage="install"
2222
WORKDIR /app/
2323
RUN \
24-
--mount=type=bind,target=bunfig.toml,source=bunfig.toml \
24+
--mount=type=bind,target=pnpm-workspace.yaml,source=pnpm-workspace.yaml \
25+
--mount=type=bind,target=pnpm-lock.yaml,source=pnpm-lock.yaml \
26+
--mount=type=bind,target=patches,source=patches \
2527
--mount=type=bind,target=package.json,source=package.json \
2628
--mount=type=bind,target=apps/workflows/package.json,source=apps/workflows/package.json \
2729
--mount=type=bind,target=packages/assertions/package.json,source=packages/assertions/package.json \
@@ -52,8 +54,11 @@ RUN \
5254
--mount=type=bind,target=packages/theme-store/package.json,source=packages/theme-store/package.json \
5355
--mount=type=bind,target=packages/locales/package.json,source=packages/locales/package.json \
5456
--mount=type=bind,target=packages/status-fetcher/package.json,source=packages/status-fetcher/package.json \
55-
--mount=type=cache,target=/root/.bun/install/cache,sharing=locked \
56-
bun install --production --frozen-lockfile --verbose
57+
--mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
58+
<<EOF
59+
corepack enable pnpm
60+
pnpm install --prod --frozen-lockfile --verbose
61+
EOF
5762

5863
# build
5964
FROM oven/bun@sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7 AS build
@@ -70,26 +75,38 @@ COPY \
7075
--from=install \
7176
--link \
7277
"/app/node_modules" "/app/node_modules"
78+
COPY \
79+
--from=install \
80+
--link \
81+
"/app/apps/workflows/node_modules" "/app/apps/workflows/node_modules"
82+
COPY \
83+
--from=install \
84+
--link \
85+
"/app/packages" "/app/packages"
7386
RUN bun build --compile --target bun --sourcemap src/index.ts --outfile=app
7487

7588
# libsql
76-
FROM oven/bun@sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7 AS libsql
89+
FROM node@sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf AS libsql
7790
LABEL \
78-
org.opencontainers.image.base.digest="sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7" \
79-
org.opencontainers.image.base.name="docker.io/oven/bun:1.3.11"
91+
org.opencontainers.image.base.digest="sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf" \
92+
org.opencontainers.image.base.name="docker.io/node:24-slim"
8093
WORKDIR /app/
8194
COPY \
8295
--from=docker \
8396
--link \
8497
"/app/apps/build-docker/package.json" "/app/package.json"
85-
RUN bun install
98+
RUN <<EOF
99+
corepack enable pnpm
100+
pnpm install --prod --lockfile-only
101+
pnpm install --prod --frozen-lockfile --config.node-linker=hoisted
102+
EOF
86103

87104
# runtime
88-
FROM debian@sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734 AS runtime
105+
FROM debian@sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604 AS runtime
89106
LABEL \
90-
io.dofigen.version="2.6.0" \
107+
io.dofigen.version="2.8.0" \
91108
org.opencontainers.image.authors="OpenStatus Team" \
92-
org.opencontainers.image.base.digest="sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734" \
109+
org.opencontainers.image.base.digest="sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604" \
93110
org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \
94111
org.opencontainers.image.description="Background job processing and probe scheduling for OpenStatus" \
95112
org.opencontainers.image.source="https://github.com/openstatusHQ/openstatus" \

apps/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ cargo install dofigen
3636
dofigen update
3737
# Generate the Dockerfile
3838
dofigen gen
39-
```
39+
```

0 commit comments

Comments
 (0)