- 根目录加入 docker-compose、Caddyfile、文档等原本不在仓库里的文件 - 前后端两份 GitHub Actions 合并成根目录的一个 deploy workflow: 构建前端上传到 build/,再在服务器上 git pull 并重建容器 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
501 B
Caddyfile
33 lines
501 B
Caddyfile
:80 {
|
|
encode gzip zstd
|
|
|
|
handle_path /* {
|
|
root * /usr/share/caddy
|
|
file_server
|
|
try_files {path} /
|
|
}
|
|
|
|
|
|
handle_path /django_static/* {
|
|
root * /static
|
|
file_server
|
|
}
|
|
|
|
handle_path /media/* {
|
|
root * /media
|
|
file_server
|
|
}
|
|
|
|
handle /admin* {
|
|
reverse_proxy webpreview-api:8000
|
|
}
|
|
|
|
handle /api* {
|
|
reverse_proxy webpreview-api:8000
|
|
}
|
|
|
|
handle /ws* {
|
|
reverse_proxy webpreview-api:8000
|
|
}
|
|
}
|