update dockerfile

This commit is contained in:
我若为王 2024-12-05 14:10:08 +08:00
parent d20bd3b634
commit c50d5ddf71

View File

@ -1,6 +1,6 @@
# 使用官方的 Node.js 镜像作为基础镜像
FROM node:18-alpine
FROM oven/bun:latest
# 设置工作目录
WORKDIR /app
@ -9,16 +9,16 @@ WORKDIR /app
COPY package*.json ./
# 安装项目依赖
RUN npm install
RUN bun install
# 复制项目文件到工作目录
COPY . .
# 构建项目(如果需要)
RUN npm run build
RUN bun build
# 暴露应用运行的端口(假设应用运行在 3000 端口)
EXPOSE 3000
# 启动应用
CMD ["npm", "start"]
CMD ["bun", "start"]