generated from ScoopInstaller/BucketTemplate
/
caddy.json
53 lines (53 loc) · 1.88 KB
/
caddy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
"version": "2.7.6",
"description": "HTTP/2 web server with automatic HTTPS",
"homepage": "https://caddyserver.com",
"license": "Apache-2.0",
"architecture": {
"64bit": {
"url": "https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_windows_amd64.zip",
"hash": "sha512:b2321473be1da500a8f6e4276aed03b11946e3758b792a3e9ba50c07246456d64d7da931d6d58be43e6d3cfd07c1ad68f6838df8e090bd5d212224a9bf94daec"
}
},
"bin": "caddy.exe",
"depends": "nssm",
"env_set": {
"CADDYFILE": "$dir\\Caddyfile"
},
"pre_install": [
"$ini = \"$dir\\Caddyfile\"",
"if (!(Test-Path \"$ini\")) {",
" Add-Content -Path \"$ini\" -Value \"http://localhost {`n`troot * /Projects/www/localhost`n`tphp_fastcgi 127.0.0.1:9081`n`tfile_server`n}\" -Encoding Ascii",
"}"
],
"persist": "Caddyfile",
"post_install": [
"# Install as windows service",
"nssm install caddy \"$dir\\caddy.exe\" \"run --config=$dir\\Caddyfile\"",
"nssm set caddy AppEnvironmentExtra PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=10000",
"nssm start caddy"
],
"uninstaller": {
"script": "$null = nssm remove caddy confirm"
},
"notes": [
"Caddy has been installed as a Windows Service with NSSM: caddy",
"",
"To start/stop the service: `nssm start caddy`, nssm stop caddy",
"",
"Edit the caddy config file: sudo notepad $dir\\Caddyfile"
],
"checkver": {
"github": "https://github.com/caddyserver/caddy"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/caddyserver/caddy/releases/download/v$version/caddy_$version_windows_amd64.zip"
}
},
"hash": {
"url": "$baseurl/caddy_$version_checksums.txt"
}
}
}