813
This commit is contained in:
@@ -5,56 +5,24 @@ services:
|
||||
container_name: headscale
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- HEADSCALE_API_KEY=QC33VFzaUw.u1qwXFap0QpFAQnwkdGuUyvpspL15185A5JnWeFpt_c # Revert to original variable name
|
||||
command: serve --config /etc/headscale/config.yaml # 明确指定配置文件路径
|
||||
- HEADSCALE_API_KEY=QC33VFzaUw.u1qwXFap0QpFAQnwkdGuUyvpspL15185A5JnWeFpt_c
|
||||
command: serve --config /etc/headscale/config.yaml
|
||||
volumes:
|
||||
- ./data/headscale:/var/lib/headscale
|
||||
# 修正挂载路径冲突问题 ↓
|
||||
- ./config.yaml:/etc/headscale/config.yaml # 删除这行
|
||||
- ./config.yaml:/etc/headscale/config.yaml
|
||||
ports:
|
||||
- "3008:8080" # Headscale API端口
|
||||
- "9090:9090" # Metrics监控端口
|
||||
- "3478:3478" # STUN 端口
|
||||
# - "41641:41641" # DERP中继端口(可选,若Derper独立部署则无需映射)
|
||||
- "12345:12345" # STUN 端口
|
||||
- "8881:8881" # DERP 端口
|
||||
- "50443:50443"
|
||||
|
||||
|
||||
- "3008:8080" # Headscale API (HTTP)
|
||||
- "3009:8443" # Headscale API (HTTPS)
|
||||
- "9090:9090" # Metrics
|
||||
- "3478:3478/udp" # STUN UDP
|
||||
- "3478:3478/tcp" # STUN TCP
|
||||
- "50443:50443" # gRPC
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
sysctls:
|
||||
- net.ipv4.ip_forward=1
|
||||
|
||||
|
||||
|
||||
|
||||
# derper:
|
||||
# image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/yangchuansheng/ip_derper:latest
|
||||
# container_name: derper
|
||||
# restart: unless-stopped
|
||||
# network_mode: host # 绑定宿主机网络
|
||||
# environment:
|
||||
# - DERP_ADDR=:12345 # DERP监听地址(TCP)
|
||||
# - DERP_STUN_ADDR=:3478 # STUN监听地址(UDP)
|
||||
# - DERP_CERTS=/app/certs # 证书路径(自签名需挂载)
|
||||
# - DERP_VERIFY_CLIENTS=false # 允许匿名中继(生产环境建议启用验证)
|
||||
# volumes:
|
||||
# - ./certs/derper:/app/certs # 自签名证书挂载(可选)
|
||||
|
||||
headscale-ui:
|
||||
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/gurucomputing/headscale-ui:2024.02.24-beta1
|
||||
container_name: headscale-ui
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- HTTP_PORT=8000
|
||||
- HEADSCALE_API_URL=http://headscale:8080
|
||||
- HEADSCALE_API_KEY=QC33VFzaUw.u1qwXFap0QpFAQnwkdGuUyvpspL15185A5JnWeFpt_c # Revert to original variable name
|
||||
ports:
|
||||
- "3009:8000" # 访问地址:http://<服务器IP>:8000/web
|
||||
|
||||
|
||||
|
||||
# common314 5b6ed5947149bc2b6d203da688afa8d5969844af8151302e
|
||||
# 9900k 734511957cbece2ae36622adf50a8ec6842d08fb771c771d
|
||||
# 12600k-rocky-client 5b37e0d239b44f1ac514603d4f6f3629bc9c21aa0321e97d
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user