add caddy

This commit is contained in:
root
2025-11-22 14:09:20 +08:00
parent e026aaabbf
commit 04a88a5b5a
2 changed files with 28 additions and 2 deletions

4
conf/Caddyfile Normal file
View File

@@ -0,0 +1,4 @@
# 代理到 hubproxy 的 5000 端口
hub.diyla.com {
reverse_proxy hubproxy:5000
}

View File

@@ -1,9 +1,9 @@
services:
hubproxy:
build:
context: .
context: .
container_name: hubproxy
restart: always
restart: unless-stopped
ports:
- "5000:5000"
volumes:
@@ -13,3 +13,25 @@ services:
options:
max-size: "1g"
max-file: "2"
caddy:
image: caddy:latest
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- $PWD/conf:/etc/caddy
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
depends_on:
- hubproxy
volumes:
caddy_data:
caddy_config: