mirror of
https://github.com/dalbodeule/hop-gate.git
synced 2025-12-08 04:45:43 +09:00
92 lines
2.8 KiB
Plaintext
92 lines
2.8 KiB
Plaintext
# hop-gate .env example
|
|
#
|
|
# 이 파일을 복사해서 `.env` 로 이름을 바꾼 뒤 값을 채워서 사용하세요.
|
|
# internal/config 패키지의 LoadServerConfigFromEnv / LoadClientConfigFromEnv 가
|
|
# .env를 먼저 읽고, 이후 환경변수로부터 설정을 구성합니다.
|
|
#
|
|
# Server-side PostgreSQL connection for admin/domain management uses:
|
|
# HOP_DB_DSN
|
|
# HOP_DB_MAX_OPEN_CONNS
|
|
# HOP_DB_MAX_IDLE_CONNS
|
|
# HOP_DB_CONN_MAX_LIFETIME
|
|
|
|
# ---- Logging / Loki ----
|
|
|
|
# 로그 레벨: debug/info/warn/error
|
|
HOP_LOG_LEVEL=info
|
|
|
|
# Loki HTTP push 사용 여부 (Promtail 없이 직접 push 할 때 true)
|
|
HOP_LOKI_ENABLE=false
|
|
|
|
# Loki HTTP push 엔드포인트 (예: http://loki:3100/loki/api/v1/push)
|
|
#HOP_LOKI_ENDPOINT=http://loki:3100/loki/api/v1/push
|
|
|
|
# 멀티 테넌시 Loki 사용 시 Tenant ID (X-Scope-OrgID 등으로 사용)
|
|
#HOP_LOKI_TENANT_ID=
|
|
|
|
# Basic Auth 자격 증명 (필요할 때만)
|
|
#HOP_LOKI_USERNAME=
|
|
#HOP_LOKI_PASSWORD=
|
|
|
|
# 모든 로그에 공통으로 붙일 라벨 (콤마 구분: key=value,key2=value2)
|
|
# 예: app=hop-gate,env=dev,region=ap-northeast-2
|
|
#HOP_LOKI_STATIC_LABELS=app=hop-gate,env=dev,region=ap-northeast-2
|
|
|
|
|
|
# ---- Server ports & domains ----
|
|
|
|
# HTTP 리스닝 포트 (보통 :80, ACME HTTP-01 및 HTTPS 리다이렉트용)
|
|
HOP_SERVER_HTTP_LISTEN=:8080
|
|
|
|
# HTTPS 리스닝 포트 (보통 :443)
|
|
HOP_SERVER_HTTPS_LISTEN=:8443
|
|
|
|
# DTLS 리스닝 포트 (보통 :443, 필요시 별도 포트 사용)
|
|
HOP_SERVER_DTLS_LISTEN=:8443
|
|
|
|
# 메인 도메인 (예: example.com)
|
|
HOP_SERVER_DOMAIN=example.com
|
|
|
|
# 프록시용 서브도메인/별도 도메인 목록 (콤마 구분)
|
|
# 예: api.example.com,edge.example.com
|
|
HOP_SERVER_PROXY_DOMAINS=api.example.com,edge.example.com
|
|
|
|
# 디버깅용 플래그
|
|
# 1. self signed localhost cert 사용여부 (debug: true -> 사용)
|
|
HOP_SERVER_DEBUG=true
|
|
|
|
# ---- PostgreSQL (server-side) ----
|
|
#
|
|
# PostgreSQL DSN (required), e.g.:
|
|
# postgres://user:pass@localhost:5432/hopgate?sslmode=disable
|
|
HOP_DB_DSN=postgres://user:pass@localhost:5432/hopgate?sslmode=disable
|
|
|
|
# Maximum number of open connections (optional, default: 10)
|
|
#HOP_DB_MAX_OPEN_CONNS=10
|
|
|
|
# Maximum number of idle connections (optional, default: 5)
|
|
#HOP_DB_MAX_IDLE_CONNS=5
|
|
|
|
# Connection max lifetime (optional, default: 30m)
|
|
# e.g. "30m", "1h"
|
|
#HOP_DB_CONN_MAX_LIFETIME=30m
|
|
|
|
|
|
# ---- Client settings ----
|
|
|
|
# DTLS 서버 주소 (host:port)
|
|
# 예: example.com:443
|
|
HOP_CLIENT_SERVER_ADDR=localhost:8443
|
|
|
|
# 클라이언트 도메인
|
|
HOP_CLIENT_DOMAIN=test.example.com
|
|
|
|
# 인증 토큰 (서버에서 검증용으로 사용 가능)
|
|
HOP_CLIENT_API_KEY=TEST_API_KEY_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
|
|
|
# 서비스 매핑: name=host:port 형태
|
|
HOP_CLIENT_LOCAL_TARGET=127.0.0.1:8080
|
|
|
|
# 디버깅용 플래그
|
|
# 1. self signed 인증서를 신뢰(인증서 체인 검증 스킵)
|
|
HOP_CLIENT_DEBUG=true |