22# Use the imbios/bun-node image as the base image with Node and Bun
33# Keep bun and node version in sync with package.json
44ARG NODE_VERSION=22.0.0
5- ARG BUN_VERSION=1.1.38
6- FROM imbios/bun-node:1.1.38 -22-slim AS base
5+ ARG BUN_VERSION=1.2.13
6+ FROM imbios/bun-node:1.2.13 -22-slim AS base
77
88LABEL fly_launch_runtime="Node.js"
99
@@ -14,7 +14,7 @@ WORKDIR /app
1414ENV NODE_ENV="production"
1515
1616# Throw-away build stage to reduce size of final image
17- From base As builder
17+ FROM base As builder
1818
1919# Install packages needed to build node modules
2020RUN apt-get update -qq && \
@@ -23,6 +23,15 @@ RUN apt-get update -qq && \
2323# Copy package.json and package-lock.json
2424COPY package.json package-lock.json ./
2525
26+ # Install the root dependencies and devDependencies
27+ RUN npm install
28+
29+ # Copy landing package.json and package-lock.json
30+ COPY landing/package.json landing/package-lock.json ./landing/
31+
32+ # Install the landing dependencies and devDependencies
33+ RUN cd landing/ && npm install
34+
2635# Copy the entire project to the working directory
2736COPY . .
2837
@@ -35,6 +44,9 @@ RUN npm run build
3544# Remove development dependencies
3645RUN npm prune --omit=dev
3746
47+ # We don't need Next.js dependencies since landing is statically exported during build step.
48+ RUN rm -rf landing/node_modules
49+
3850# Final stage for app image
3951FROM base
4052
0 commit comments