feat(tunnels): switch to temporary Cloudflare tunnels

Replace persistent Cloudflare tunnels (API-based) with temporary tunnels using
'cloudflared tunnel --url'. This removes the need for Cloudflare API tokens,
DNS records, and persistent tunnel management.

Changes:
- Install cloudflared binary in API Dockerfile
- Add start_cloudflared_tunnel() and stop_cloudflared_tunnel() to docker.py
- Update instance start/stop/restart/delete to use temporary tunnels
- Store tunnel PID in tunnel_id field, temporary URL in url/public_url
- Remove Cloudflare API service (cloudflare_tunnel.py)
- Remove cloudflared container from docker-compose
- Remove Cloudflare env vars (CLOUDFLARE_API_TOKEN, ZONE_ID, etc.)
- Remove Cloudflare configuration from config.py
- Remove Cloudflare startup check from main.py
- Remove /health/cloudflare endpoint
This commit is contained in:
Fusion
2026-05-20 16:23:16 +02:00
parent 23ae12e69c
commit 2bd778117f
8 changed files with 113 additions and 476 deletions
+1 -6
View File
@@ -53,12 +53,7 @@ class Settings(BaseSettings):
# Tool instance storage
instance_base_path: str = "/data/instances"
# Cloudflare Tunnel configuration
cloudflare_api_token: str | None = None
cloudflare_zone_id: str | None = None
cloudflare_account_id: str | None = None
cloudflare_base_domain: str | None = None
cloudflared_config_dir: str = "/etc/cloudflared"
model_config = SettingsConfigDict(env_file=".env", extra="ignore", populate_by_name=True)