Skip to content

Commit

Permalink
fix: use node runtime
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Dec 14, 2024
1 parent 6083ec3 commit a01d1ff
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# syntax = docker/dockerfile:1

# ARG NODE_VERSION=22.9.0
# FROM node:${NODE_VERSION}-slim as base
FROM oven/bun:slim as base
ARG NODE_VERSION=22.9.0
FROM node:${NODE_VERSION}-slim as base
# FROM oven/bun:slim as base

# LABEL fly_launch_runtime="Node.js"
LABEL fly_launch_runtime="Bun"
LABEL fly_launch_runtime="Node.js"
# LABEL fly_launch_runtime="Bun"

# Node.js app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"
ENV NITRO_PRESET="bun"
# ENV NITRO_PRESET="bun"

RUN curl -fsSL https://bun.sh/install | bash

# Throw-away build stage to reduce size of final image
FROM base as build
Expand All @@ -35,4 +37,5 @@ COPY --from=build /app/.output ./

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "bun", "run", "/app/server/index.mjs" ]
# CMD [ "bun", "run", "/app/server/index.mjs" ]
CMD [ "node", "/app/server/index.mjs" ]

0 comments on commit a01d1ff

Please sign in to comment.