Skip to content
Draft
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
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile
Expand All @@ -45,8 +43,6 @@ jobs:

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile
Expand All @@ -63,8 +59,6 @@ jobs:

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down Expand Up @@ -100,8 +98,6 @@ jobs:

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies (all platforms' native packages)
run: bun install --frozen-lockfile --os='*' --cpu='*'
Expand Down Expand Up @@ -145,8 +141,6 @@ jobs:

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# syntax=docker/dockerfile:1

FROM oven/bun:1.3.11 AS build
# The one place the Bun version lives for the image; CI reads it from
# package.json "packageManager" instead, so bumping Bun is two lines.
ARG BUN_VERSION=1.4.2

FROM oven/bun:${BUN_VERSION} AS build
WORKDIR /app
# vendor/pixel-art-icons is a `file:` dep — `bun install` needs it on disk to
# resolve the dependency, so copy it alongside the manifest before installing.
Expand All @@ -10,13 +14,13 @@ RUN bun install --frozen-lockfile
COPY . .
RUN bun run build

FROM oven/bun:1.3.11 AS production-deps
FROM oven/bun:${BUN_VERSION} AS production-deps
WORKDIR /app
COPY package.json bun.lock ./
COPY vendor ./vendor
RUN bun install --frozen-lockfile --production

FROM oven/bun:1.3.11 AS runtime
FROM oven/bun:${BUN_VERSION} AS runtime
WORKDIR /app

ARG INSTATIC_VERSION=dev
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"private": true,
"version": "0.0.18",
"engines": {
"bun": ">=1.3.0 <1.4.0"
"bun": ">=1.4.0 <1.5.0"
},
"packageManager": "bun@1.4.2",
"description": "Self-hosted CMS with an integrated visual editor.",
"author": "David Babinec",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync-plugin-bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Bundler determinism: `Bun.build` output is stable within a Bun minor but is
* NOT guaranteed bit-identical across minors, so a Bun upgrade can legitimately
* change the bytes. The expected Bun is pinned by `engines.bun` in package.json
* (`>=1.3.0 <1.4.0`) and by the `oven/bun:1.3` base image in the Dockerfile. On
* (`>=1.4.0 <1.5.0`) and by the `oven/bun:1.4` base image in the Dockerfile. On
* a deliberate Bun-minor bump, regenerate (`bun run bootstrap:sync`) in the same
* change so the gate fails only on real source drift, never on a routine
* upgrade.
Expand Down
5 changes: 3 additions & 2 deletions src/__tests__/server/dockerConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ describe('self-host docker config', () => {
it('defines a production Docker image that builds assets before runtime startup', () => {
const dockerfile = readFileSync('Dockerfile', 'utf8')

expect(dockerfile).toContain('FROM oven/bun:1.3.11 AS build')
expect(dockerfile).toContain('ARG BUN_VERSION=1.4.2')
expect(dockerfile).toContain('FROM oven/bun:${BUN_VERSION} AS build')
expect(dockerfile).toContain('RUN bun run build')
expect(dockerfile).toContain('FROM oven/bun:1.3.11 AS runtime')
expect(dockerfile).toContain('FROM oven/bun:${BUN_VERSION} AS runtime')
expect(dockerfile).toContain('ARG INSTATIC_VERSION=dev')
expect(dockerfile).toContain('LABEL org.opencontainers.image.version="${INSTATIC_VERSION}"')
expect(dockerfile).toContain('CMD ["bun", "run", "server/index.ts"]')
Expand Down
Loading