Add Caddy build script and test data

This commit is contained in:
akp 2024-11-25 23:34:06 +00:00
parent d58d5791b7
commit 97af6b6073
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755
2 changed files with 60 additions and 0 deletions

View 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
View 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
}
}
}
}
}
}