Files
common-server-public/tailscale/docker-compose.yml
2025-03-09 16:14:12 +08:00

60 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: "3.9"
services:
headscale:
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/headscale/headscale:v0.23.0-beta2
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 # 明确指定配置文件路径
volumes:
- ./data/headscale:/var/lib/headscale
# 修正挂载路径冲突问题 ↓
- ./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"
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