Skip to content

Commit

Permalink
Fix container builds (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
inetol authored Aug 2, 2024
1 parent 7dfb6fc commit d7e63c7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
*
!src/
!bun.lockb
!dist/backend.step2.tmp.js
!bunfig.toml
!LICENSE
!package.json
!swc.json
!tsconfig.json
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ jobs:
with:
egress-policy: audit

- name: "Setup Bun"
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1

- name: "Setup QEMU"
run: |
sudo apt-get update
Expand Down Expand Up @@ -150,12 +153,18 @@ jobs:
with:
persist-credentials: false

- name: "Setup production dependencies"
run: bun install --frozen-lockfile --production

- name: "Run build"
run: bun run build

- name: "Build image"
id: build-image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
archs: amd64, arm64
containerfiles: Dockerfile
platforms: linux/amd64,linux/arm64
image: ${{ github.repository }}
layers: true
oci: true
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build the bundle localy before building the image: "bun run build"
FROM docker.io/oven/bun:1-alpine AS builder
WORKDIR /build/

COPY . ./

RUN bun install --frozen-lockfile --production && \
bun run build:standalone
RUN bun run build:x:step3:standalone

FROM cgr.dev/chainguard/cc-dynamic:latest
WORKDIR /backend/
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
},
"dependencies": {
"@hono/zod-openapi": "~0.15.1",
"@scalar/hono-api-reference": "~0.5.126",
"@scalar/hono-api-reference": "~0.5.128",
"@swc/cli": "~0.4.0",
"@swc/core": "~1.7.4",
"@swc/core": "~1.7.5",
"@types/bun": "~1.1.6",
"cbor-x": "~1.6.0",
"chalk": "~5.3.0",
Expand Down

0 comments on commit d7e63c7

Please sign in to comment.