mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
refactor(build): 🏗️ Simplify Dockerfile, only use Bun
This commit is contained in:
parent
5e6e881b98
commit
bad7d43b1e
|
|
@ -1,19 +1,20 @@
|
|||
FROM imbios/bun-node:21-alpine AS base
|
||||
FROM oven/bun:1.1.14-alpine AS base
|
||||
|
||||
# Install dependencies into temp directory
|
||||
# This will cache them and speed up future builds
|
||||
FROM base AS install
|
||||
|
||||
RUN mkdir -p /temp/dev
|
||||
COPY package.json bun.lockb /temp/dev/
|
||||
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||
|
||||
FROM base AS builder
|
||||
|
||||
COPY . /app
|
||||
|
||||
COPY --from=install /temp/dev/node_modules /app/node_modules
|
||||
RUN cd /app && bun run build --preset node-server
|
||||
RUN cd /app && bun run build
|
||||
|
||||
FROM node:21-alpine as final
|
||||
FROM oven/bun:1.1.14-alpine as final
|
||||
|
||||
COPY --from=builder /app/.output/ /app
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue