Điểm qua abiosoft/caddy-exec: 155 sao trên GitHub, viết chủ yếu bằng Go. Caddy v2 module for running one-off commands
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
matcher - Caddyfile matcher. When set, this command runs when there is an http request at the current route or the specified matcher. You may leverage other matchers to protect the endpoint.
command - command to run
args... - command arguments
directory - directory to run the command from
timeout - timeout to terminate the command's process. Default is 10s. A timeout of 0 runs indefinitely.
log - Caddy log output module for standard output log. Defaults to stderr.
err_log - Caddy log output module for standard error log. Defaults to the value of log (standard output log).
foreground - if present, runs the command in the foreground. For commands at http endpoints, the command will exit before the http request is responded to.
pass_thru - if present, enables pass-thru mode, which continues to the next HTTP handler in the route instead of responding directly
startup - if present, run the command at startup. Ignored in routes.
shutdown - if present, run the command at shutdown. Ignored in routes.
route /update {
... # other directives e.g. for authentication
exec git pull origin master {
log file /var/logs/hugo.log
}
}
API/JSON
As a top level app for startup and shutdown commands.
{
"apps": {
"http": { ... },
// app configuration
"exec": {
// list of commands
"commands": [
// command configuration
{
// command to execute
"command": "hugo",
// [optional] command arguments
"args": [
"generate",
"--destination=/home/user/site/public"
],
// when to run the command, can include 'startup' or 'shutdown'
"at": ["startup"],
// [optional] directory to run the command from. Default is the current directory.
"directory": "",
// [optional] if the command should run on the foreground. Default is false.
"foreground": false,
// [optional] if the middleware should respond directly or pass the request on to the next handler in the route. Default is false.
"pass_thru": false,
// [optional] timeout to terminate the command's process. Default is 10s.
"timeout": "10s",
// [optional] log output module config for standard output. Default is `stderr` module.
"log": {
"output": "file",
"filename": "/var/logs/hugo.log"
},
// [optional] log output module config for standard error. Default is the value of `log`.
"err_log": {
"output": "stderr"
}
}
]
}
}
}
As an handler within a route.
{
...
"routes": [
{
"handle": [
// exec configuration for an endpoint route
{
// required to inform caddy the handler is `exec`
"handler": "exec",
// command to execute
"command": "git",
// command arguments it's also possible to use
// caddy variables like {http.request.uuid}
"args": ["pull", "origin", "master", "# {http.request.uuid}"],
// [optional] directory to run the command from. Default is the current directory.
"directory": "/home/user/site/public",
// [optional] if the command should run on the foreground. Default is false.
"foreground": true,
// [optional] if the middleware should respond directly or pass the request on to the next handler in the route. Default is false.
"pass_thru": true,
// [optional] timeout to terminate the command's process. Default is 10s.
"timeout": "5s",
// [optional] log output module config for standard output. Default is `stderr` module.
"log": {
"output": "file",
"filename": "/var/logs/hugo.log"
},
// [optional] log output module config for standard error. Default is the value of `log`.
"err_log": {
"output": "stderr"
}
}
],
"match": [
{
"path": ["/update"]
}
]
}
]
}
Dynamic Configuration
Caddy supports dynamic zero-downtime configuration reloads and it is possible to modify exec's configurations at runtime.
exec intelligently determines when Caddy is starting and shutting down. i.e. startup and shutdown commands do not get triggered during configuration reload, only during Caddy's actual startup and shutdown.
abiosoft/caddy-exec có 155 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/abiosoft/caddy-exec. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
abiosoft/caddy-exec có những chủ đề gì?
GitHub topics của abiosoft/caddy-exec: "caddy", "caddy-module", "caddyserver", "command", "exec". TopGit xếp repo vào nhóm mã nguồn mở.
abiosoft/caddy-exec còn đang phát triển không?
Commit gần nhất trên abiosoft/caddy-exec là 2.2 năm trước (theo timestamp GitHub). Repo có 21 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
abiosoft/caddy-exec viết bằng ngôn ngữ gì?
abiosoft/caddy-exec chủ yếu viết bằng Go. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về abiosoft/caddy-exec ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/abiosoft/caddy-exec là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về caddy-exec?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về caddy-exec.