Single part at the root, COMPOSE_FILE in .env

This commit is contained in:
hh
2026-09-08 20:38:27 +02:00
parent ade2cebf63
commit ecd38ee28b
31 changed files with 70 additions and 28 deletions
@@ -0,0 +1,55 @@
{% if frontend_adapter == 'bun' -%}
FROM oven/bun:alpine
ENV TERM=xterm-256color
ENV COLORTERM=truecolor
WORKDIR /app
COPY package.json bun.lock* ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun --bun svelte-kit sync
RUN bun --bun run build
ENTRYPOINT ["bun"]
CMD ["build/index.js"]
{%- else -%}
FROM oven/bun:alpine AS deps
ENV TERM=xterm-256color
ENV COLORTERM=truecolor
ENV BUN_INSTALL_CACHE_DIR=/bun-cache
WORKDIR /app
COPY package.json bun.lock* ./
RUN --mount=type=cache,target=/bun-cache bun install --frozen-lockfile
FROM deps AS builder
COPY . .
RUN bun --bun svelte-kit sync
RUN bun run build
FROM oven/bun:alpine AS runtime
ENV NODE_ENV=production
WORKDIR /app
COPY --from=builder /app/build ./build
COPY --from=builder /app/serve.ts ./serve.ts
EXPOSE 3000
ENTRYPOINT ["bun"]
CMD ["run", "serve.ts"]
{%- endif %}