-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
ARG BUN_VERSION=1.0.18 | ||
FROM oven/bun:${BUN_VERSION} as base | ||
# Adjust NODE_VERSION as desired | ||
ARG NODE_VERSION=18.18.0 | ||
FROM node:${NODE_VERSION}-slim as base | ||
|
||
LABEL fly_launch_runtime="Bun" | ||
LABEL fly_launch_runtime="Node.js" | ||
|
||
# Node.js app lives here | ||
WORKDIR /app | ||
|
@@ -12,6 +13,9 @@ WORKDIR /app | |
ENV NODE_ENV="production" | ||
ENV NITRO_PRESET="bun" | ||
|
||
# Install bun | ||
RUN npm install -g [email protected] | ||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base as build | ||
|
||
|
@@ -23,7 +27,7 @@ COPY . ./ | |
|
||
# Install node modules | ||
COPY --link .npmrc package.json bun.lockb ./ | ||
RUN bun install | ||
RUN bun install --frozen-lockfile | ||
|
||
# Build application | ||
RUN bun run build | ||
|