File tree Expand file tree Collapse file tree 4 files changed +51
-1
lines changed Expand file tree Collapse file tree 4 files changed +51
-1
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ npm-debug.log
3
+ Dockerfile *
4
+ docker-compose *
5
+ .dockerignore
6
+ .git
7
+ .github
8
+ .gitignore
9
+ README.md
10
+ LICENSE
11
+ .vscode
12
+ dist
13
+ build
14
+ images
15
+ script
Original file line number Diff line number Diff line change
1
+ FROM node:16
2
+
3
+ WORKDIR /app
4
+
5
+ COPY package*.json ./
6
+
7
+ RUN npm install
8
+
9
+ COPY . .
10
+
11
+ EXPOSE 6688
12
+
13
+ CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change @@ -68,6 +68,28 @@ pnpm install
68
68
pnpm start
69
69
```
70
70
71
+ ## Docker 部署
72
+
73
+ > 安装及配置 Docker 将不在此处说明,请自行解决
74
+
75
+ ### 本地构建
76
+
77
+ ``` bash
78
+ // 构建
79
+ docker build -t dailyhot-api .
80
+ // 运行
81
+ docker run -p 6688:6688 -d dailyhot-api
82
+ ```
83
+
84
+ ### 在线部署
85
+
86
+ ``` bash
87
+ // 拉取
88
+ docker pull imsyy/dailyhot-api:1.0.4
89
+ // 运行
90
+ docker run -p 6688:6688 -d imsyy/dailyhot-api:1.0.4
91
+ ```
92
+
71
93
## Vercel 部署
72
94
73
95
现已支持 Vercel 部署,无需服务器
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " dailyhot_api" ,
3
- "version" : " 1.0.3 " ,
3
+ "version" : " 1.0.4 " ,
4
4
"description" : " 一个今日热榜" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments