feat: add caddy config

This commit is contained in:
h
2026-06-02 01:22:58 +02:00
parent 17cd31c41e
commit 3aaa3c757f
9 changed files with 90 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
CLOUDFLARE_API_TOKEN=
+2
View File
@@ -0,0 +1,2 @@
Caddyfile
.env
+30
View File
@@ -0,0 +1,30 @@
{
admin off
# acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}
log {
format console
}
servers {
trusted_proxies cloudflare
client_ip_headers Cf-Connecting-Ip
}
}
<DOMAIN> {
@backend path /api/* /mcp/*
handle @backend {
reverse_proxy beavergram-api:8080
}
handle {
root * /srv
try_files {path} /index.html
file_server
}
}
dev.<DOMAIN> {
reverse_proxy beavergram-frontend:5173
}
+23
View File
@@ -0,0 +1,23 @@
services:
caddy:
image: ghcr.io/caddybuilds/caddy-cloudflare:latest
restart: unless-stopped
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
- "0.0.0.0:443:443/udp"
networks:
- caddy
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ../frontend/build:/srv:ro
- caddy_data:/data
env_file:
- .env
networks:
caddy:
external: true
volumes:
caddy_data: