@whyour/qinglong 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-en.md +13 -15
- package/README.md +14 -17
- package/docker/Dockerfile +6 -8
- package/docker/docker-entrypoint.sh +2 -16
- package/docker/front.conf +12 -0
- package/ecosystem.config.js +8 -0
- package/package.json +13 -8
- package/sample/config.sample.sh +10 -20
- package/sample/notify.js +115 -136
- package/sample/notify.py +7 -7
- package/shell/api.sh +4 -4
- package/shell/bot.sh +0 -3
- package/shell/check.sh +1 -13
- package/shell/env.sh +0 -0
- package/shell/share.sh +2 -4
- package/shell/start.sh +1 -11
- package/shell/update.sh +6 -17
- package/static/build/api/config.js +23 -6
- package/static/build/api/log.js +3 -32
- package/static/build/api/script.js +31 -21
- package/static/build/api/system.js +76 -8
- package/static/build/config/const.js +18 -1
- package/static/build/config/index.js +3 -0
- package/static/build/config/util.js +98 -95
- package/static/build/data/notify.js +2 -2
- package/static/build/data/{auth.js → system.js} +3 -3
- package/static/build/loaders/db.js +4 -4
- package/static/build/loaders/deps.js +11 -14
- package/static/build/loaders/express.js +4 -6
- package/static/build/loaders/initFile.js +16 -16
- package/static/build/loaders/sentry.js +2 -3
- package/static/build/loaders/sock.js +3 -3
- package/static/build/public.js +1 -1
- package/static/build/schedule/client.js +1 -1
- package/static/build/schedule/health.js +1 -1
- package/static/build/schedule/index.js +1 -1
- package/static/build/services/cron.js +32 -25
- package/static/build/services/dependence.js +15 -5
- package/static/build/services/env.js +2 -2
- package/static/build/services/notify.js +8 -7
- package/static/build/services/script.js +2 -6
- package/static/build/services/sshKey.js +27 -52
- package/static/build/services/subscription.js +19 -21
- package/static/build/services/system.js +112 -21
- package/static/build/services/user.js +52 -41
- package/static/build/shared/pLimit.js +4 -4
- package/static/dist/{6644.1f11b8fa.async.js → 1431.36b64dc5.async.js} +1 -1
- package/static/dist/3752.56c3fba2.async.js +1 -0
- package/static/dist/{419.e21ea0bd.async.js → 419.d9597044.async.js} +1 -1
- package/static/dist/{8008.cf4ff203.async.js → 8008.fbdcf863.async.js} +1 -1
- package/static/dist/833.7348bf8c.async.js +1 -0
- package/static/dist/8722.408e3112.async.js +1 -0
- package/static/dist/{8171.e2986b87.async.js → 9847.d72d4b37.async.js} +1 -1
- package/static/dist/index.html +1 -1
- package/static/dist/layouts__index.2c89a418.async.js +1 -0
- package/static/dist/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/static/dist/monaco-editor/min/vs/base/worker/workerMain.js +22 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/abap/abap.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/apex/apex.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/azcli/azcli.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/bat/bat.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/bicep/bicep.js +11 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/cameligo/cameligo.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/clojure/clojure.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/coffee/coffee.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/cpp/cpp.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/csharp/csharp.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/csp/csp.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/css/css.js +12 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/dart/dart.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/ecl/ecl.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/elixir/elixir.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/flow9/flow9.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/freemarker2/freemarker2.js +12 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/go/go.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/graphql/graphql.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/hcl/hcl.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/html/html.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/ini/ini.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/java/java.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/javascript/javascript.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/julia/julia.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/less/less.js +11 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/lexon/lexon.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/liquid/liquid.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/lua/lua.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/m3/m3.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/markdown/markdown.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/mips/mips.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/msdax/msdax.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/mysql/mysql.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/objective-c/objective-c.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/pascal/pascal.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/pascaligo/pascaligo.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/perl/perl.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/pgsql/pgsql.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/php/php.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/pla/pla.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/postiats/postiats.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/powershell/powershell.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/protobuf/protobuf.js +11 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/pug/pug.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/python/python.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/qsharp/qsharp.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/r/r.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/razor/razor.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/redis/redis.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/redshift/redshift.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/ruby/ruby.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/rust/rust.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/sb/sb.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/scala/scala.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/scheme/scheme.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/scss/scss.js +12 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/shell/shell.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/solidity/solidity.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/sophia/sophia.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/sparql/sparql.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/sql/sql.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/st/st.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/swift/swift.js +13 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/systemverilog/systemverilog.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/tcl/tcl.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/twig/twig.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/typescript/typescript.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/vb/vb.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/xml/xml.js +10 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/yaml/yaml.js +10 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.css +6 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.js +805 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.de.js +29 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.es.js +29 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.fr.js +27 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.it.js +27 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ja.js +29 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.js +27 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ko.js +27 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ru.js +29 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.zh-cn.js +29 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.zh-tw.js +27 -0
- package/static/dist/monaco-editor/min/vs/language/css/cssMode.js +13 -0
- package/static/dist/monaco-editor/min/vs/language/css/cssWorker.js +63 -0
- package/static/dist/monaco-editor/min/vs/language/html/htmlMode.js +13 -0
- package/static/dist/monaco-editor/min/vs/language/html/htmlWorker.js +453 -0
- package/static/dist/monaco-editor/min/vs/language/json/jsonMode.js +15 -0
- package/static/dist/monaco-editor/min/vs/language/json/jsonWorker.js +36 -0
- package/static/dist/monaco-editor/min/vs/language/typescript/tsMode.js +20 -0
- package/static/dist/monaco-editor/min/vs/language/typescript/tsWorker.js +33970 -0
- package/static/dist/monaco-editor/min/vs/loader.js +11 -0
- package/static/dist/src__pages__config__index.e809a5d0.async.js +1 -0
- package/static/dist/src__pages__crontab__detail.5b509309.async.js +1 -0
- package/static/dist/src__pages__crontab__index.73fc56e9.chunk.css +1 -0
- package/static/dist/src__pages__crontab__index.da430aa9.async.js +1 -0
- package/static/dist/{src__pages__crontab__modal.3fa8f075.async.js → src__pages__crontab__modal.13de83de.async.js} +1 -1
- package/static/dist/src__pages__dependence__index.27d29203.async.js +1 -0
- package/static/dist/src__pages__dependence__logModal.b55dacc8.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.3cc1a9be.async.js +1 -0
- package/static/dist/src__pages__diff__index.218dfd1a.async.js +1 -0
- package/static/dist/{src__pages__env__editNameModal.25c21e59.async.js → src__pages__env__editNameModal.08af0049.async.js} +1 -1
- package/static/dist/src__pages__env__modal.4c039f3d.async.js +1 -0
- package/static/dist/src__pages__error__index.1748dfaa.async.js +1 -0
- package/static/dist/src__pages__initialization__index.8f114cca.async.js +1 -0
- package/static/dist/src__pages__log__index.84556deb.async.js +1 -0
- package/static/dist/src__pages__script__editModal.17bcb1c2.async.js +1 -0
- package/static/dist/{src__pages__script__editNameModal.ca76e055.async.js → src__pages__script__editNameModal.61262353.async.js} +1 -1
- package/static/dist/src__pages__script__index.27582916.async.js +1 -0
- package/static/dist/{src__pages__script__renameModal.c166915b.async.js → src__pages__script__renameModal.3e39fdf4.async.js} +1 -1
- package/static/dist/src__pages__script__saveModal.449e50d8.async.js +1 -0
- package/static/dist/{src__pages__script__setting.020a7629.async.js → src__pages__script__setting.7944fdd6.async.js} +1 -1
- package/static/dist/{src__pages__setting__about.e3293e77.chunk.css → src__pages__setting__about.f6325812.chunk.css} +1 -1
- package/static/dist/{src__pages__setting__appModal.efa5bb29.async.js → src__pages__setting__appModal.a419e539.async.js} +1 -1
- package/static/dist/{src__pages__setting__other.b4adcffe.chunk.css → src__pages__setting__dependence.55c598d0.chunk.css} +1 -1
- package/static/dist/src__pages__setting__dependence.7bcddc85.async.js +1 -0
- package/static/dist/src__pages__setting__index.d2fc96f6.async.js +1 -0
- package/static/dist/{src__pages__setting__index.d57cc3fc.chunk.css → src__pages__setting__index.d666f8ec.chunk.css} +1 -1
- package/static/dist/src__pages__setting__notification.552e6815.async.js +1 -0
- package/static/dist/src__pages__setting__other.55c598d0.chunk.css +1 -0
- package/static/dist/src__pages__setting__other.a029d99a.async.js +1 -0
- package/static/dist/{src__pages__setting__security.d14993c7.async.js → src__pages__setting__security.c667d9e8.async.js} +1 -1
- package/static/dist/src__pages__subscription__modal.07629f02.async.js +1 -0
- package/static/dist/{umi.decd4ae2.js → umi.c864c23a.js} +1 -1
- package/version.yaml +27 -5
- package/sample/package.json +0 -12
- package/static/dist/5619.db04f386.async.js +0 -1
- package/static/dist/6747.36513965.async.js +0 -1
- package/static/dist/833.5add31bf.async.js +0 -1
- package/static/dist/layouts__index.931ce4c3.async.js +0 -1
- package/static/dist/src__pages__config__index.9d83dfb7.async.js +0 -1
- package/static/dist/src__pages__crontab__detail.7bceef05.async.js +0 -1
- package/static/dist/src__pages__crontab__index.55c93601.async.js +0 -1
- package/static/dist/src__pages__crontab__index.9fb90359.chunk.css +0 -1
- package/static/dist/src__pages__dependence__index.21153c24.async.js +0 -1
- package/static/dist/src__pages__dependence__logModal.5aada63c.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.96353c88.async.js +0 -1
- package/static/dist/src__pages__diff__index.e644b15f.async.js +0 -1
- package/static/dist/src__pages__env__modal.4fd6abc2.async.js +0 -1
- package/static/dist/src__pages__error__index.f3ca5563.async.js +0 -1
- package/static/dist/src__pages__initialization__index.727e0f70.async.js +0 -1
- package/static/dist/src__pages__log__index.ba2c1721.async.js +0 -1
- package/static/dist/src__pages__script__editModal.8d7bac2a.async.js +0 -1
- package/static/dist/src__pages__script__index.da31e2c2.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.7ee07566.async.js +0 -1
- package/static/dist/src__pages__setting__index.540c33a4.async.js +0 -1
- package/static/dist/src__pages__setting__notification.b99a4c64.async.js +0 -1
- package/static/dist/src__pages__setting__other.d20be1c1.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.61e787ce.async.js +0 -1
package/README-en.md
CHANGED
|
@@ -56,7 +56,7 @@ npm i @whyour/qinglong
|
|
|
56
56
|
|
|
57
57
|
## Built-in commands
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
- task
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
# Execute in sequence, if a random delay is set, it will be randomly delayed by a certain number of seconds
|
|
@@ -75,7 +75,7 @@ task -m <max_time> <file_path>
|
|
|
75
75
|
task <file_path> -- -u whyour -p password
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
- ql
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
81
|
# Update and restart Green Dragon
|
|
@@ -98,19 +98,17 @@ ql resetlet
|
|
|
98
98
|
ql resettfa
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- account_number: Specify the account number of an environment variable to be executed when the task is executed
|
|
113
|
-
- max_time: Timeout, suffix "s" for seconds (default), "m" for minutes, "h" for hours, "d" for days
|
|
101
|
+
| **Parameter** | **Description** |
|
|
102
|
+
|---|---|
|
|
103
|
+
| file_url | Script address |
|
|
104
|
+
| repo_url | Repository address |
|
|
105
|
+
| whitelist | The whitelist when pulling the repository, i.e., the string contained in the path of the script to be pulled |
|
|
106
|
+
| blacklist | Blacklisting when pulling repositories, i.e. strings that are not included in the path of the script to be pulled |
|
|
107
|
+
| dependence | Pulling the dependencies needed for the repository will be copied directly from the repository to the repository directory under scripts, regardless of the blacklist |
|
|
108
|
+
| extensions | Pull the branch of the repository |
|
|
109
|
+
| branch | Number of days of logs to be kept |
|
|
110
|
+
| days | File path for task execution |
|
|
111
|
+
| file_path | The name of the environment variable that needs to be concurrent or specified at the time of task execution |
|
|
114
112
|
|
|
115
113
|
## Deployment
|
|
116
114
|
|
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ npm i @whyour/qinglong
|
|
|
58
58
|
|
|
59
59
|
## 内置命令
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
- task
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
64
|
# 依次执行,如果设置了随机延迟,将随机延迟一定秒数
|
|
@@ -75,7 +75,7 @@ task -m <max_time> <file_path>
|
|
|
75
75
|
task <file_path> -- -u whyour -p password
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
- ql
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
81
|
# 更新并重启青龙
|
|
@@ -98,20 +98,17 @@ ql resetlet
|
|
|
98
98
|
ql resettfa
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- env_name: 任务执行时需要并发或者指定时的环境变量名称
|
|
113
|
-
- account_number: 任务执行时指定某个环境变量需要执行的账号序号
|
|
114
|
-
- max_time: 超时时间,后缀"s"代表秒(默认值), "m"代表分, "h"代表小时, "d"代表天
|
|
101
|
+
| **参数** | **说明** |
|
|
102
|
+
|------------|---------------------------------------------------------------------------------------------|
|
|
103
|
+
| file_url | 脚本地址 |
|
|
104
|
+
| repo_url | 仓库地址 |
|
|
105
|
+
| whitelist | 拉取仓库时的白名单,即就是需要拉取的脚本的路径包含的字符串,多个竖线分割 |
|
|
106
|
+
| blacklist | 拉取仓库时的黑名单,即就是需要拉取的脚本的路径不包含的字符串,多个竖线分割 |
|
|
107
|
+
| dependence | 拉取仓库需要的依赖文件,会直接从仓库拷贝到scripts下的仓库目录,不受黑名单影响,多个竖线分割 |
|
|
108
|
+
| extensions | 拉取仓库的文件后缀,多个竖线分割 |
|
|
109
|
+
| branch | 拉取仓库的分支 |
|
|
110
|
+
| days | 需要保留的日志的天数 |
|
|
111
|
+
| file_path | 任务执行时的文件路径 |
|
|
115
112
|
|
|
116
113
|
## 部署
|
|
117
114
|
|
|
@@ -190,7 +187,7 @@ $ pnpm install
|
|
|
190
187
|
$ pnpm start
|
|
191
188
|
```
|
|
192
189
|
|
|
193
|
-
打开你的浏览器,访问 http://127.0.0.1:5700
|
|
190
|
+
打开你的浏览器,访问 <http://127.0.0.1:5700>
|
|
194
191
|
|
|
195
192
|
## 链接
|
|
196
193
|
|
package/docker/Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
FROM node:
|
|
1
|
+
FROM node:20-slim as nodebuilder
|
|
2
2
|
|
|
3
|
-
FROM python:3.
|
|
3
|
+
FROM python:3.11-slim-bullseye as builder
|
|
4
4
|
COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
|
|
5
5
|
COPY --from=nodebuilder /usr/local/bin/node /usr/local/bin/
|
|
6
6
|
COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
|
|
@@ -10,9 +10,9 @@ RUN set -x && \
|
|
|
10
10
|
apt install --no-install-recommends -y libatomic1 && \
|
|
11
11
|
npm i -g pnpm@8.3.1 && \
|
|
12
12
|
cd /tmp/build && \
|
|
13
|
-
pnpm
|
|
13
|
+
pnpm install --prod
|
|
14
14
|
|
|
15
|
-
FROM python:3.
|
|
15
|
+
FROM python:3.11-slim-bullseye
|
|
16
16
|
|
|
17
17
|
ARG QL_MAINTAINER="whyour"
|
|
18
18
|
LABEL maintainer="${QL_MAINTAINER}"
|
|
@@ -53,9 +53,7 @@ RUN set -x && \
|
|
|
53
53
|
git config --global user.email "qinglong@@users.noreply.github.com" && \
|
|
54
54
|
git config --global user.name "qinglong" && \
|
|
55
55
|
git config --global http.postBuffer 524288000 && \
|
|
56
|
-
npm install -g pnpm@8.3.1 && \
|
|
57
|
-
cd && pnpm config set registry https://registry.npmmirror.com && \
|
|
58
|
-
pnpm add -g pm2 tsx && \
|
|
56
|
+
npm install -g pnpm@8.3.1 pm2 tsx && \
|
|
59
57
|
rm -rf /root/.pnpm-store && \
|
|
60
58
|
rm -rf /root/.local/share/pnpm/store && \
|
|
61
59
|
rm -rf /root/.cache && \
|
|
@@ -77,6 +75,6 @@ COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/
|
|
|
77
75
|
WORKDIR ${QL_DIR}
|
|
78
76
|
|
|
79
77
|
HEALTHCHECK --interval=5s --timeout=2s --retries=20 \
|
|
80
|
-
CMD curl -sf http://127.0.0.1:5400/api/health || exit 1
|
|
78
|
+
CMD curl -sf --noproxy '*' http://127.0.0.1:5400/api/health || exit 1
|
|
81
79
|
|
|
82
80
|
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
|
@@ -15,20 +15,6 @@ pm2 l &>/dev/null
|
|
|
15
15
|
|
|
16
16
|
echo -e "======================2. 安装依赖========================\n"
|
|
17
17
|
patch_version
|
|
18
|
-
if [[ $PipMirror ]]; then
|
|
19
|
-
pip3 config set global.index-url $PipMirror
|
|
20
|
-
fi
|
|
21
|
-
current_npm_registry=$(cd && pnpm config get registry)
|
|
22
|
-
is_equal_registry=$(echo $current_npm_registry | grep "${NpmMirror}")
|
|
23
|
-
if [[ "$is_equal_registry" == "" ]]; then
|
|
24
|
-
cd && pnpm config set registry $NpmMirror
|
|
25
|
-
pnpm install -g
|
|
26
|
-
fi
|
|
27
|
-
if [[ ! -s $dir_scripts/package.json ]] || [[ $(diff $dir_sample/package.json $dir_scripts/package.json) ]]; then
|
|
28
|
-
cp -f $dir_sample/package.json $dir_scripts/package.json
|
|
29
|
-
npm_install_2 $dir_scripts
|
|
30
|
-
fi
|
|
31
|
-
echo
|
|
32
18
|
|
|
33
19
|
echo -e "======================3. 启动nginx========================\n"
|
|
34
20
|
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
|
@@ -39,13 +25,13 @@ reload_pm2
|
|
|
39
25
|
|
|
40
26
|
if [[ $AutoStartBot == true ]]; then
|
|
41
27
|
echo -e "======================5. 启动bot========================\n"
|
|
42
|
-
nohup ql
|
|
28
|
+
nohup ql bot >$dir_log/bot.log 2>&1 &
|
|
43
29
|
echo -e "bot后台启动中...\n"
|
|
44
30
|
fi
|
|
45
31
|
|
|
46
32
|
if [[ $EnableExtraShell == true ]]; then
|
|
47
33
|
echo -e "====================6. 执行自定义脚本========================\n"
|
|
48
|
-
nohup ql
|
|
34
|
+
nohup ql extra >$dir_log/extra.log 2>&1 &
|
|
49
35
|
echo -e "自定义脚本后台执行中...\n"
|
|
50
36
|
fi
|
|
51
37
|
|
package/docker/front.conf
CHANGED
|
@@ -22,6 +22,10 @@ server {
|
|
|
22
22
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
23
23
|
proxy_pass http://publicApi/api/;
|
|
24
24
|
proxy_buffering off;
|
|
25
|
+
proxy_redirect default;
|
|
26
|
+
proxy_connect_timeout 1800;
|
|
27
|
+
proxy_send_timeout 1800;
|
|
28
|
+
proxy_read_timeout 1800;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
location QL_BASE_URLapi/ {
|
|
@@ -30,6 +34,10 @@ server {
|
|
|
30
34
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
31
35
|
proxy_pass http://baseApi/api/;
|
|
32
36
|
proxy_buffering off;
|
|
37
|
+
proxy_redirect default;
|
|
38
|
+
proxy_connect_timeout 1800;
|
|
39
|
+
proxy_send_timeout 1800;
|
|
40
|
+
proxy_read_timeout 1800;
|
|
33
41
|
|
|
34
42
|
proxy_set_header Upgrade $http_upgrade;
|
|
35
43
|
proxy_set_header Connection $connection_upgrade;
|
|
@@ -41,6 +49,10 @@ server {
|
|
|
41
49
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
42
50
|
proxy_pass http://baseApi/open/;
|
|
43
51
|
proxy_buffering off;
|
|
52
|
+
proxy_redirect default;
|
|
53
|
+
proxy_connect_timeout 1800;
|
|
54
|
+
proxy_send_timeout 1800;
|
|
55
|
+
proxy_read_timeout 1800;
|
|
44
56
|
}
|
|
45
57
|
|
|
46
58
|
gzip on;
|
package/ecosystem.config.js
CHANGED
|
@@ -9,6 +9,14 @@ module.exports = {
|
|
|
9
9
|
source_map_support: true,
|
|
10
10
|
time: true,
|
|
11
11
|
script: 'static/build/schedule/index.js',
|
|
12
|
+
env: {
|
|
13
|
+
http_proxy: '',
|
|
14
|
+
https_proxy: '',
|
|
15
|
+
HTTP_PROXY: '',
|
|
16
|
+
HTTPS_PROXY: '',
|
|
17
|
+
all_proxy: '',
|
|
18
|
+
ALL_PROXY: '',
|
|
19
|
+
},
|
|
12
20
|
},
|
|
13
21
|
{
|
|
14
22
|
name: 'public',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whyour/qinglong",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"@grpc/grpc-js": "^1.8.13",
|
|
75
75
|
"@otplib/preset-default": "^12.0.1",
|
|
76
76
|
"@sentry/node": "^7.12.1",
|
|
77
|
-
"@sentry/tracing": "^7.12.1",
|
|
78
77
|
"body-parser": "^1.19.2",
|
|
79
78
|
"celebrate": "^15.0.1",
|
|
80
79
|
"chokidar": "^3.5.3",
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
"js-yaml": "^4.1.0",
|
|
96
95
|
"jsonwebtoken": "^8.5.1",
|
|
97
96
|
"lodash": "^4.17.21",
|
|
98
|
-
"multer": "
|
|
97
|
+
"multer": "1.4.5-lts.1",
|
|
99
98
|
"nedb": "^1.8.0",
|
|
100
99
|
"node-schedule": "^2.1.0",
|
|
101
100
|
"nodemailer": "^6.7.2",
|
|
@@ -106,14 +105,17 @@
|
|
|
106
105
|
"sequelize": "^6.25.5",
|
|
107
106
|
"serve-handler": "^6.1.3",
|
|
108
107
|
"sockjs": "^0.3.24",
|
|
109
|
-
"sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.0.
|
|
108
|
+
"sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.0.4",
|
|
110
109
|
"tar": "^6.1.15",
|
|
111
110
|
"toad-scheduler": "^1.6.0",
|
|
112
111
|
"typedi": "^0.10.0",
|
|
113
112
|
"uuid": "^8.3.2",
|
|
114
113
|
"winston": "^3.6.0",
|
|
115
114
|
"winston-daily-rotate-file": "^4.7.1",
|
|
116
|
-
"yargs": "^17.3.1"
|
|
115
|
+
"yargs": "^17.3.1",
|
|
116
|
+
"tough-cookie": "^4.0.0",
|
|
117
|
+
"request-ip": "3.3.0",
|
|
118
|
+
"ip2region": "2.3.0"
|
|
117
119
|
},
|
|
118
120
|
"devDependencies": {
|
|
119
121
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
"@types/cross-spawn": "^6.0.2",
|
|
127
129
|
"@types/express": "^4.17.13",
|
|
128
130
|
"@types/express-jwt": "^6.0.4",
|
|
129
|
-
"@types/file-saver": "
|
|
131
|
+
"@types/file-saver": "2.0.2",
|
|
130
132
|
"@types/js-yaml": "^4.0.5",
|
|
131
133
|
"@types/jsonwebtoken": "^8.5.8",
|
|
132
134
|
"@types/lodash": "^4.14.185",
|
|
@@ -144,6 +146,7 @@
|
|
|
144
146
|
"@types/sockjs-client": "^1.5.1",
|
|
145
147
|
"@types/tar": "^6.1.5",
|
|
146
148
|
"@types/uuid": "^8.3.4",
|
|
149
|
+
"@types/request-ip": "0.0.41",
|
|
147
150
|
"@uiw/codemirror-extensions-langs": "^4.21.9",
|
|
148
151
|
"@uiw/react-codemirror": "^4.21.9",
|
|
149
152
|
"@umijs/max": "^4.0.72",
|
|
@@ -155,11 +158,13 @@
|
|
|
155
158
|
"axios": "^1.4.0",
|
|
156
159
|
"compression-webpack-plugin": "9.2.0",
|
|
157
160
|
"concurrently": "^7.0.0",
|
|
158
|
-
"
|
|
161
|
+
"react-hotkeys-hook": "^4.4.1",
|
|
162
|
+
"file-saver": "2.0.2",
|
|
159
163
|
"lint-staged": "^13.0.3",
|
|
160
164
|
"monaco-editor": "0.33.0",
|
|
161
|
-
"nodemon": "^
|
|
165
|
+
"nodemon": "^3.0.1",
|
|
162
166
|
"prettier": "^2.5.1",
|
|
167
|
+
"pretty-bytes": "6.1.1",
|
|
163
168
|
"qiniu": "^7.4.0",
|
|
164
169
|
"qrcode.react": "^1.0.1",
|
|
165
170
|
"query-string": "^7.1.1",
|
package/sample/config.sample.sh
CHANGED
|
@@ -21,20 +21,19 @@ DiskWarn=90
|
|
|
21
21
|
## 设置定时任务执行的超时时间,例如1h,后缀"s"代表秒(默认值), "m"代表分, "h"代表小时, "d"代表天
|
|
22
22
|
CommandTimeoutTime=""
|
|
23
23
|
|
|
24
|
-
## 在运行 task
|
|
25
|
-
|
|
26
|
-
RandomDelay="300"
|
|
24
|
+
## 在运行 task 命令时,随机延迟启动任务的最大延迟时间,如 RandomDelay="300" ,表示任务将在 1-300 秒内随机延迟一个秒数,然后再运行,取消延迟赋值为空
|
|
25
|
+
RandomDelay=""
|
|
27
26
|
|
|
28
27
|
## 需要随机延迟运行任务的文件后缀,直接写后缀名即可,多个后缀用空格分开,例如: js py ts
|
|
29
28
|
## 默认仅给javascript任务加随机延迟,其它任务按定时规则准点运行。全部任务随机延迟赋值为空
|
|
30
|
-
RandomDelayFileExtensions="
|
|
29
|
+
RandomDelayFileExtensions=""
|
|
31
30
|
|
|
32
31
|
## 每小时的第几分钟准点运行任务,当在这些时间运行任务时将忽略 RandomDelay 配置,不会被随机延迟
|
|
33
32
|
## 默认是第0分钟和第30分钟,例如21:00或21:30分的任务将会准点运行。不需要准点运行赋值为空
|
|
34
|
-
RandomDelayIgnoredMinutes="
|
|
33
|
+
RandomDelayIgnoredMinutes=""
|
|
35
34
|
|
|
36
|
-
## 如果你自己会写shell
|
|
37
|
-
EnableExtraShell="
|
|
35
|
+
## 如果你自己会写shell脚本,并且希望在每次容器启动时,额外运行你的 shell 脚本,请赋值为 "true"
|
|
36
|
+
EnableExtraShell=""
|
|
38
37
|
|
|
39
38
|
## 是否自动启动bot,默认不启动,设置为true时自动启动,目前需要自行克隆bot仓库所需代码,存到ql/repo目录下,文件夹命名为dockerbot
|
|
40
39
|
AutoStartBot=""
|
|
@@ -42,12 +41,6 @@ AutoStartBot=""
|
|
|
42
41
|
## 是否使用第三方bot,默认不使用,使用时填入仓库地址,存到ql/repo目录下,文件夹命名为diybot
|
|
43
42
|
BotRepoUrl=""
|
|
44
43
|
|
|
45
|
-
## 安装python依赖时指定pip源
|
|
46
|
-
PipMirror="https://pypi.doubanio.com/simple/"
|
|
47
|
-
|
|
48
|
-
## 安装node依赖时指定npm源
|
|
49
|
-
NpmMirror="https://registry.npmmirror.com"
|
|
50
|
-
|
|
51
44
|
## 通知环境变量
|
|
52
45
|
## 1. Server酱
|
|
53
46
|
## https://sct.ftqq.com
|
|
@@ -156,11 +149,8 @@ export AIBOTK_TYPE=""
|
|
|
156
149
|
export AIBOTK_NAME=""
|
|
157
150
|
|
|
158
151
|
## 14. SMTP
|
|
159
|
-
##
|
|
160
|
-
|
|
161
|
-
export SMTP_SERVER=""
|
|
162
|
-
## smtp_ssl 填写 SMTP 发送邮件服务器是否使用 SSL,内容应为 true 或 false
|
|
163
|
-
export SMTP_SSL="false"
|
|
152
|
+
## 邮箱服务名称,比如126、163、Gmail、QQ等,支持列表 https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json
|
|
153
|
+
export SMTP_SERVICE=""
|
|
164
154
|
## smtp_email 填写 SMTP 收发件邮箱,通知将会由自己发给自己
|
|
165
155
|
export SMTP_EMAIL=""
|
|
166
156
|
## smtp_password 填写 SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定
|
|
@@ -178,8 +168,8 @@ export PUSHME_KEY=""
|
|
|
178
168
|
## CHRONOCAT_TOKEN 填写在CHRONOCAT文件生成的访问密钥
|
|
179
169
|
## CHRONOCAT_QQ 个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx
|
|
180
170
|
## CHRONOCAT相关API https://chronocat.vercel.app/install/docker/official/
|
|
181
|
-
export CHRONOCAT_URL=""
|
|
182
|
-
export CHRONOCAT_QQ=""
|
|
171
|
+
export CHRONOCAT_URL=""
|
|
172
|
+
export CHRONOCAT_QQ=""
|
|
183
173
|
export CHRONOCAT_TOKEN=""
|
|
184
174
|
|
|
185
175
|
## 其他需要的变量,脚本中需要的变量使用 export 变量名= 声明即可
|