-
Notifications
You must be signed in to change notification settings - Fork 80
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
zhukai
committed
May 29, 2023
1 parent
1a374cc
commit 5f6b8ab
Showing
14 changed files
with
467 additions
and
336 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 |
---|---|---|
|
@@ -322,3 +322,4 @@ config.yaml | |
.vscode | ||
|
||
data/ | ||
.DS_Store |
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
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 |
---|---|---|
|
@@ -5,33 +5,44 @@ | |
## 注意事项 | ||
- 依赖 [midjourney-proxy](https://github.com/novicezk/midjourney-proxy) 提供的api接口 | ||
- 仅作为midjourney-proxy项目的示例应用场景,有问题需自行解决 | ||
- 推荐使用docker启动;mac M或其他arm架构电脑,暂时使用npm启动 | ||
|
||
## 快速启动 | ||
|
||
1. 下载镜像 | ||
```shell | ||
docker pull novicezk/wechat-midjourney:1.0.1 | ||
docker pull novicezk/wechat-midjourney:2.0 | ||
``` | ||
2. 启动容器,并设置参数 | ||
2. 启动容器 | ||
```shell | ||
# /xxx/xxx/config目录下创建.env和sensitive_words.txt | ||
docker run -d --name wechat-midjourney \ | ||
-p 4120:4120 \ | ||
-v /xxx/xxx/config:/app/config \ | ||
--restart=always \ | ||
novicezk/wechat-midjourney:2.0 | ||
|
||
# 或启动时添加配置 | ||
docker run -d --name wechat-midjourney \ | ||
-p 4120:4120 \ | ||
-e MJ_PROXY_ENDPOINT=http://172.17.0.1:8080/mj \ | ||
-e MJ_NOFIFY_HOOK=http://172.17.0.1:4120/notify \ | ||
--restart=always \ | ||
novicezk/wechat-midjourney:1.0.1 | ||
novicezk/wechat-midjourney:2.0 | ||
``` | ||
|
||
3. 查看启动日志,微信扫描二维码,若二维码无法扫码,复制二维码链接浏览器打开扫码 | ||
```shell | ||
docker logs -f -n 200 wechat-midjourney | ||
``` | ||
## npm启动 | ||
```shell | ||
git clone [email protected]:novicezk/wechat-midjourney.git | ||
cd wechat-midjourney.git | ||
cd wechat-midjourney | ||
npm install | ||
# 可能执行错误,缺少library,按提示解决 | ||
cp .env.example .env | ||
cp config/.env.example config/.env | ||
# 更改配置项,启动服务 | ||
npm run serve | ||
``` | ||
|
@@ -41,5 +52,5 @@ npm run serve | |
| 变量名 | 非空 | 描述 | | ||
| :-----| :----: | :---- | | ||
| MJ_PROXY_ENDPOINT | 是 | midjourney代理服务的地址 | | ||
| BLOCK_WORDS | 否 | 敏感词,英文逗号分隔 | | ||
|
||
| MJ_NOFIFY_HOOK | 是 | 当前服务的回调接收地址 | | ||
| HTTP_PROXY | 否 | http代理地址 | |
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,2 @@ | ||
MJ_PROXY_ENDPOINT="http://localhost:8080/mj" | ||
MJ_NOFIFY_HOOK="http://localhost:4120/notify" |
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,5 @@ | ||
转法轮 | ||
自焚 | ||
吸毒 | ||
贩毒 | ||
赌博 |
Oops, something went wrong.