You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are deploying a SvelteKit-built app using Bun, you may have come to realize it's fairly slow.
Why not use a Dockerfile instead?
ARG BUN_VERSION=1.1.2
FROM oven/bun:${BUN_VERSION} AS builder
WORKDIR /app
COPY . .
RUN bun i
RUN bun run build
FROM oven/bun:${BUN_VERSION}
COPY --from=builder /app/build .
ENV PORT 3000
EXPOSE 3000
USER bun
CMD ["bun", "run", "start"]
You may also want to add to a .dockerignore the following:
node_modules/
.svelte-kit/
build/
Hope this helps someone. If anyone has any improvements that should be made to this, please update.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If you are deploying a SvelteKit-built app using Bun, you may have come to realize it's fairly slow.
Why not use a Dockerfile instead?
You may also want to add to a .dockerignore the following:
Hope this helps someone. If anyone has any improvements that should be made to this, please update.
Beta Was this translation helpful? Give feedback.
All reactions