72 lines
3.6 KiB
Plaintext
72 lines
3.6 KiB
Plaintext
# Sample Environment Configuration for Reverse Proxy Architecture
|
|
# Copy this file to .env, .env.development or .env.production and fill in your values
|
|
|
|
# Common
|
|
# =========================================
|
|
|
|
# === Instance Configuration ===
|
|
INSTANCE_NAME=myapp-3000 # Unique identifier for the service instance (alphanumeric, hyphens, underscores only)
|
|
# The container and volume name will be {INSTANCE_NAME}-frpc
|
|
|
|
# Target server information for proxy connection
|
|
TARGET_SERVER=WW.XX.YY.ZZ # Target Proxy Server IP/hostname
|
|
TARGET_USER=your_user_name # Username for SSH access to target server
|
|
SSH_PORT=22 # SSH port for target server (default 22)
|
|
|
|
# SSH key file name (must be in $HOME/.ssh/)
|
|
SSH_KEY_FILE_NAME=your_key # SSH private key file name in $HOME/.ssh/
|
|
|
|
# === Domain Configuration ===
|
|
DOMAIN_NAME=myapp.example.com # Public domain for Traefik routing
|
|
|
|
# Debug flag
|
|
DEBUG=false # Set to true for additional debug output
|
|
|
|
# FRP
|
|
# =========================================
|
|
|
|
# === FRP vs Traefik Mode Configuration ===
|
|
FRP=true # Set to 'true' to use FRP mode, 'false' to use Traefik-only mode
|
|
|
|
# === Internal Service Container Configuration (FRP Mode) ===
|
|
INTERNAL_SERVICE_PORT=3000 # Port exposed by the target Docker container (e.g., 3000)
|
|
DOCKER_NETWORK=app-network # Docker network for connecting to internal service container
|
|
|
|
# === FRP Server Configuration (FRP Mode) ===
|
|
FRP_SERVER_ADDR=192.168.1.100 # Public IP address of the FRP server
|
|
FRP_SERVER_USER=myuser # Username for FRP server (defaults to 'teenfuture')
|
|
FRP_SERVER_PORT=16999 # Port for FRP communication (default 16999)
|
|
|
|
# === Service Configuration ===
|
|
SERVICE_DOCKER_CONTAINER_NAME=your-app-docker-container # Docker container name for internal service connection
|
|
|
|
# === FRP Remote Ports Configuration (FRP Mode) ===
|
|
PROXY_WEB_PORT=11077 # Remote port for web proxy
|
|
PROXY_RAD_PORT=8779 # Remote port for rad proxy (default 8779, use 8776 if following standard)
|
|
PROXY_SSH_PORT=13076 # Remote port for SSH proxy (default 13076)
|
|
|
|
# Dynamic Proxy Configuration - Use PROXY_*_PORT format for additional proxies
|
|
# Examples:
|
|
# PROXY_API_PORT=8080 # Creates an 'api' proxy to port 8080
|
|
# PROXY_API_LOCAL_PORT=8000 # Optional local port for the API proxy (defaults to service port)
|
|
# PROXY_DATABASE_PORT=5432 # Creates a 'database' proxy to port 5432
|
|
# PROXY_DATABASE_LOCAL_PORT=5433 # Optional local port for database proxy
|
|
# PROXY_CUSTOM_PORT=9000 # Creates a 'custom' proxy to port 9000
|
|
|
|
# Traefik
|
|
# =========================================
|
|
|
|
# === Target Proxy Server Configuration (Traefik Mode) ===
|
|
# This section is used when FRP=false
|
|
|
|
# Destination path for host or docker volume folder deployment
|
|
DEST_PATH=/ # Destination path on target server
|
|
|
|
# Target Application Service information (on the target server)
|
|
TARGET_SERVICE_NAME=your-app-service # Name of the Docker container running the application service
|
|
TARGET_SERVICE_PORT=3000 # Port the application service is listening on
|
|
|
|
# Traefik configuration
|
|
TRAEFIK_VER=v3.5.4 # Traefik Docker image version to use
|
|
LETSENCRYPT_EMAIL=admin@yourdomain.com # Email for Let's Encrypt certificate registration
|
|
RESTART_TRAEFIK=false # Set to 'true' to restart Traefik after configuration (default: false for dynamic loading) |