From aa00d62943306739e37b1cca1a7febf1f7a99a6d Mon Sep 17 00:00:00 2001 From: JustSong Date: Sat, 30 Jul 2022 00:56:31 +0800 Subject: [PATCH] :book: update readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 47ca6ab..edc4fe2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ + 使用专门的桌面客户端进行推送,消息直达你的电脑,需要额外安装一个非常小的客户端,[详见此处](./client/README.md)。 2. 支持 Markdown。 3. 支持部署在 Heroku 上,无需自己的服务器,[详见此处](#在-Heroku-上的搭建步骤)。 +4. 支持使用 Docker 进行部署。 ## 用途举例 1. [整合进自己的博客系统,每当有人登录时发微信消息提醒](https://github.com/songquanpeng/blog/blob/486d63e96ef7906a6c767653a20ec2d3278e9a4a/routes/user.js#L27)。 @@ -18,6 +19,7 @@ 先去你的云服务提供商那里添加一个子域名,解析到你的目标服务器。 ### 服务器端配置 +#### 方式一:手动配置环境 1. 配置 Node.js 环境,推荐使用 [nvm](https://github.com/nvm-sh/nvm)。 2. 下载代码:`git clone https://github.com/songquanpeng/message-pusher.git`,或者 `git clone https://gitee.com/songquanpeng/message-pusher`。 3. 修改根目录下的 config.js 文件: @@ -33,6 +35,11 @@ 3. 重启 Nginx 服务:`sudo service nginx restart`。 8. 默认用户名密码为:`admin` 和 `123456`,且默认禁止新用户注册,如需修改,请编辑 `config.js`。 +#### 方式二:使用 Docker 进行部署 +1. 拉取镜像:`docker pull justsong/message-pusher:latest` +2. 运行:`docker -p 3000:3000 run justsong/message-pusher:latest` +3. 接上面的第 7 步。 + ### 微信测试号配置 1. 首先前往[此页面](https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index)拿到 APP_ID 以及 APP_SECRET。 2. 使用微信扫描下方的测试号二维码,拿到你的 OPEN_ID。