Add Caddy build script and test data
This commit is contained in:
parent
d58d5791b7
commit
97af6b6073
2 changed files with 60 additions and 0 deletions
5
buildCaddyWithZipModule.sh
Normal file
5
buildCaddyWithZipModule.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
xcaddy build --with github.com/codemicro/palmatum/caddyZipFs --replace github.com/codemicro/palmatum=$(pwd)
|
55
testdata/zipfiletest.json
vendored
Normal file
55
testdata/zipfiletest.json
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"logging": {
|
||||
"logs": {
|
||||
"default": {
|
||||
"level": "DEBUG"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apps": {
|
||||
"caddy.filesystems": {
|
||||
"filesystems": [
|
||||
{
|
||||
"name": "zf",
|
||||
"file_system": {
|
||||
"backend": "zipfile",
|
||||
"path": "testdata/site-b.zip"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"http": {
|
||||
"http_port": 8080,
|
||||
"servers": {
|
||||
"srv0": {
|
||||
"listen": [
|
||||
":8080"
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"match": [
|
||||
{
|
||||
"host": [
|
||||
"localhost"
|
||||
]
|
||||
}
|
||||
],
|
||||
"handle": [
|
||||
{
|
||||
"handler": "subroute",
|
||||
"routes": [
|
||||
{"handle":[{"fs":"zf","handler":"file_server","hide":["testdata/zipfiletest.Caddyfile"]}]}
|
||||
]
|
||||
}
|
||||
],
|
||||
"terminal": true
|
||||
}
|
||||
],
|
||||
"automatic_https": {
|
||||
"disable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue