DockFlare/env.example
martadams89 bbafcce887 Add support for external cloudflared container integration and update documentation
- Introduced configuration options for using an existing cloudflared container.
- Updated README, env.example, and docker-compose.yml to reflect new settings.
- Enhanced status page to display external cloudflared mode information.
2025-04-20 19:27:47 +01:00

64 lines
No EOL
2.6 KiB
Text

# .env: DockFlare Tunnel Manager Configuration
# -----------------------------------------------------------------------------
# Environment variables for DockFlare. Create as '.env' in project root.
# DO NOT commit this file to version control!
# -----------------------------------------------------------------------------
# REQUIRED: Obtain a token with specific permissions for DockFlare to manage
# Cloudflare Tunnels and DNS records. Generate one at:
# https://dash.cloudflare.com/profile/api-tokens
# REQUIRED PERMISSIONS:
# - Account > Cloudflare Tunnel > Edit: Create, list, and delete Cloudflare Tunnels.
# - Zone > DNS > Edit: Create and delete DNS records (CNAME records for tunnels).
#
# SECURITY BEST PRACTICE: Use a token with the *least* privilege necessary. More information:
# https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
# Cloudflare API Token with the following permissions:
# - Account: Cloudflare Tunnel [Write]
# - Zone: DNS [Edit] (if managing DNS records)
CF_API_TOKEN=your_cloudflare_api_token
# Your Cloudflare Account ID
CF_ACCOUNT_ID=your_cloudflare_account_id
# Optional: Your Cloudflare Zone ID for DNS record management
# If not provided, container labels must specify zonename
CF_ZONE_ID=optional_cloudflare_zone_id
# The name to use for the Cloudflare Tunnel
TUNNEL_NAME=dockflare-tunnel
# Optional: Change the grace period (in seconds) for deleted containers
# Default: 28800 (8 hours)
GRACE_PERIOD_SECONDS=28800
# Optional: Change the label prefix used to identify containers to manage
# Default: cloudflare.tunnel
LABEL_PREFIX=cloudflare.tunnel
# Optional: External cloudflared configuration
# Set to 'true' if you're using an external cloudflared container
# instead of letting DockFlare create one
USE_EXTERNAL_CLOUDFLARED=false
# The ID of your external tunnel when USE_EXTERNAL_CLOUDFLARED=true
# Required if USE_EXTERNAL_CLOUDFLARED is true
# This is the only required field for external mode - container name isn't needed
EXTERNAL_TUNNEL_ID=your_external_tunnel_id
# Optional: Override the default cloudflared container name
# Default: cloudflared-agent-{TUNNEL_NAME}
# Note: Only used when USE_EXTERNAL_CLOUDFLARED=false
CLOUDFLARED_CONTAINER_NAME=cloudflared-agent-dockflare
# Optional: Customize the Docker network for cloudflared
# Default: cloudflare-net
# Note: Only used when USE_EXTERNAL_CLOUDFLARED=false
CLOUDFLARED_NETWORK_NAME=cloudflare-net
# STATE_FILE_PATH: Path to the application's state file (tunnel status, config).
# Ensure the application has read/write access. Use a persistent volume in
# containerized environments to preserve state across restarts.
STATE_FILE_PATH=/app/data/state.json