forked from weijunext/smart-excel-ai
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
a9d61bf
commit 17b8af6
Showing
2 changed files
with
57 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 使用 Node.js 官方镜像 | ||
FROM node:20-alpine | ||
|
||
# 设置工作目录 | ||
WORKDIR /app | ||
|
||
# 复制 package.json 和 package-lock.json | ||
COPY package*.json ./ | ||
|
||
# 安装依赖 | ||
RUN npm install | ||
|
||
RUN npm install next | ||
|
||
# 复制项目文件 | ||
COPY . . | ||
|
||
# 构建应用(如果需要) | ||
RUN npm run build | ||
|
||
# 暴露应用端口 | ||
EXPOSE 3000 | ||
|
||
# 启动应用 | ||
CMD ["npm", "start"] |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: SmartExcel | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: SmartExcel | ||
template: | ||
metadata: | ||
labels: | ||
app: SmartExcel | ||
spec: | ||
containers: | ||
- name: SmartExcel | ||
image: wangyuyu/smart-excel:latest | ||
ports: | ||
- containerPort: 3000 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: SmartExcel | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 3000 | ||
targetPort: 3000 | ||
nodePort: 30001 # 可选,指定 NodePort | ||
selector: | ||
app: SmartExcel |