Skip to content

Commit 4b5a70f

Browse files
revert: restore Deno build state (#2323) (#2329)
1 parent a07b8a6 commit 4b5a70f

534 files changed

Lines changed: 4804 additions & 2975 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Check
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check:
11+
name: 🔍 Check
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 15
14+
env:
15+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
16+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
17+
steps:
18+
- name: ⬇️ Checkout repo
19+
uses: actions/checkout@v6
20+
21+
- name: Set up pnpm
22+
uses: pnpm/action-setup@v6
23+
24+
- name: ⎔ Setup node
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: 24
28+
cache: "pnpm"
29+
30+
- name: 🦕 Setup Deno
31+
uses: denoland/setup-deno@v2
32+
with:
33+
deno-version: v2.x
34+
35+
- name: 📥 Download deps
36+
run: pnpm install
37+
38+
- name: 🔍 Check
39+
run: pnpm check

.github/workflows/dx.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ jobs:
4141
- name: 📥 Download deps
4242
run: pnpm install
4343

44-
- name: 🔥 Install bun
45-
uses: oven-sh/setup-bun@v2
44+
- name: 🦕 Setup Deno
45+
uses: denoland/setup-deno@v2
4646
with:
47-
bun-version: latest
47+
deno-version: v2.x
4848

4949
- name: 🔥 DX task
5050
run: pnpm dx

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ jobs:
3030
uses: actions/checkout@v6
3131

3232
- name: Set up pnpm
33-
uses: pnpm/action-setup@v4
33+
uses: pnpm/action-setup@v6
3434

3535
- name: ⎔ Setup node
3636
uses: actions/setup-node@v6
3737
with:
3838
node-version: 24
3939
cache: "pnpm"
4040

41-
- name: 🔥 Install bun
42-
uses: oven-sh/setup-bun@v2
41+
- name: 🦕 Setup Deno
42+
uses: denoland/setup-deno@v2
4343
with:
44-
bun-version: latest
44+
deno-version: v2.x
4545

4646
- name: 📥 Download deps
4747
run: pnpm install

apps/dashboard/env.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
const file = Bun.file("./.env.example");
2-
await Bun.write("./.env", file);
1+
await Deno.copyFile("./.env.example", "./.env");

apps/screenshot-service/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@openstatus/screenshot-service",
33
"version": "0.0.1",
44
"scripts": {
5+
"check": "deno check --sloppy-imports .",
56
"dev": "bun run --hot src/index.ts",
67
"start": "NODE_ENV=production bun run src/index.ts"
78
},

apps/server/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
node_modules
2+
app
3+
src/_serve.bundle.mjs
4+
.deno_compile_bundle_*.mjs
5+
app.tmp-*

apps/server/Dockerfile

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# See https://github.com/lenra-io/dofigen
44

55
# install
6-
FROM node@sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf AS install
6+
FROM node@sha256:b31e7a42fdf8b8aa5f5ed477c72d694301273f1069c5a2f71d53c6482e99a2fc AS install
77
LABEL \
8-
org.opencontainers.image.base.digest="sha256:242549cd46785b480c832479a730f4f2a20865d61ea2e404fdb2a5c3d3b73ecf" \
8+
org.opencontainers.image.base.digest="sha256:b31e7a42fdf8b8aa5f5ed477c72d694301273f1069c5a2f71d53c6482e99a2fc" \
99
org.opencontainers.image.base.name="docker.io/node:24-slim" \
1010
org.opencontainers.image.stage="install"
1111
WORKDIR /app/
@@ -48,14 +48,14 @@ RUN \
4848
--mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
4949
<<EOF
5050
corepack enable pnpm
51-
pnpm install --prod --frozen-lockfile --verbose
51+
pnpm install --prod --frozen-lockfile --filter=@openstatus/server... --verbose
5252
EOF
5353

5454
# build
55-
FROM oven/bun@sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7 AS build
55+
FROM denoland/deno@sha256:8d24854de78a79c56e74b49aa4c5996c60e1fe3730efba8fbdd2692c582e6e29 AS build
5656
LABEL \
57-
org.opencontainers.image.base.digest="sha256:0733e50325078969732ebe3b15ce4c4be5082f18c4ac1a0f0ca4839c2e4e42a7" \
58-
org.opencontainers.image.base.name="docker.io/oven/bun:1.3.11" \
57+
org.opencontainers.image.base.digest="sha256:8d24854de78a79c56e74b49aa4c5996c60e1fe3730efba8fbdd2692c582e6e29" \
58+
org.opencontainers.image.base.name="docker.io/denoland/deno:2.9.0" \
5959
org.opencontainers.image.stage="build"
6060
ENV NODE_ENV="production"
6161
WORKDIR /app/apps/server
@@ -74,15 +74,17 @@ COPY \
7474
--from=install \
7575
--link \
7676
"/app/packages" "/app/packages"
77-
RUN bun build --compile --sourcemap src/index.ts --outfile=app
77+
RUN <<EOF
78+
deno bundle --platform=deno --minify --sloppy-imports --node-modules-dir=manual --output src/_serve.bundle.mjs src/serve.ts
79+
deno compile --no-check -A --node-modules-dir=none --include static/openapi.yaml --include static/openapi-v1.json --output app src/_serve.bundle.mjs
80+
EOF
7881

7982
# runtime
80-
FROM debian@sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604 AS runtime
83+
FROM registry.access.redhat.com/hi/curl@sha256:848b81ab5d5e55371d7193fd4f1ea7b605d14dbb039344ffad34a4c1f0d880f4 AS runtime
8184
LABEL \
8285
io.dofigen.version="2.8.0" \
8386
org.opencontainers.image.authors="OpenStatus Team" \
84-
org.opencontainers.image.base.digest="sha256:cd1bc32f233a49f1b82149c9edb8ef34fb1e6c45f37211445c51a97603468604" \
85-
org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \
87+
org.opencontainers.image.base.digest="sha256:848b81ab5d5e55371d7193fd4f1ea7b605d14dbb039344ffad34a4c1f0d880f4" \
8688
org.opencontainers.image.description="REST API server with Hono framework for OpenStatus" \
8789
org.opencontainers.image.source="https://github.com/openstatusHQ/openstatus" \
8890
org.opencontainers.image.title="OpenStatus Server" \
@@ -93,18 +95,12 @@ COPY \
9395
--chmod=555 \
9496
--link \
9597
"/app/apps/server/app" "/bin/"
96-
USER 0:0
97-
RUN <<EOF
98-
apt-get update
99-
apt-get install -y --no-install-recommends curl
100-
rm -rf /var/lib/apt/lists/*
101-
EOF
10298
USER 1000:1000
10399
EXPOSE 3000
104100
HEALTHCHECK \
105101
--interval=30s \
106102
--timeout=10s \
107103
--start-period=30s \
108104
--retries=3 \
109-
CMD curl -f http://localhost:3000/ping || exit 1
105+
CMD ["curl", "-f", "http://localhost:3000/ping"]
110106
ENTRYPOINT ["/bin/app"]

apps/server/bunfig.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/server/deno.jsonc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Needed to fix the import aliases */
2+
{
3+
"imports": {
4+
"@/": "./src/",
5+
},
6+
}

apps/server/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ services:
88
- 3000:3000
99
image: server
1010
command: .
11+
env_file:
12+
- ../../.env.docker

0 commit comments

Comments
 (0)