Skip to content

Commit

Permalink
refactor(build): 🐛 Switch final docker image to Node (use Bun for eve…
Browse files Browse the repository at this point in the history
…rything else except final Docker)

Solves issues with Bun's missing Brotli implementation
  • Loading branch information
CPlusPatch committed Apr 25, 2024
1 parent d1f61dc commit b105c40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.1.4-alpine AS base
FROM imbios/bun-node:21-alpine AS base

# Install dependencies into temp directory
# This will cache them and speed up future builds
Expand All @@ -11,9 +11,9 @@ FROM base AS builder
COPY . /app

COPY --from=install /temp/dev/node_modules /app/node_modules
RUN cd /app && bun run build
RUN cd /app && bun run build --preset node-server

FROM base as final
FROM node:21-alpine as final

COPY --from=builder /app/.output/ /app

Expand All @@ -25,4 +25,4 @@ LABEL org.opencontainers.image.title "Lysand-FE"
LABEL org.opencontainers.image.description "Frontend for the Lysand Project"

WORKDIR /app
CMD ["bun", "run", "server/index.mjs"]
CMD ["node", "server/index.mjs"]

0 comments on commit b105c40

Please sign in to comment.