Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
悠灵
Chatroom
Commits
fc48bbd1
Commit
fc48bbd1
authored
Aug 31, 2025
by
root
Browse files
dockerfile
parent
d07b4bc6
Changes
2
Show whitespace changes
Inline
Side-by-side
.dockerignore
0 → 100644
View file @
fc48bbd1
node_modules
.next
.git
.env
*.log
Dockerfile
.dockerignore
\ No newline at end of file
Dockerfile
0 → 100644
View file @
fc48bbd1
# 使用官方 Node.js 基础镜像
FROM
node:18-alpine
# 设置工作目录
WORKDIR
/app
# 复制包管理文件(优先复制以利用 Docker 缓存)
COPY
package.json pnpm-lock.yaml ./
# 安装 pnpm 和依赖
RUN
npm
install
-g
pnpm
&&
\
pnpm
install
--frozen-lockfile
# 复制所有项目文件
COPY
. .
# 生成 Prisma 客户端
RUN
pnpm prisma generate
# 构建 Next.js 应用
RUN
pnpm build
# 暴露端口(Next.js 默认 3000)
EXPOSE
3000
# 启动命令
CMD
["pnpm", "start"]
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment