813
This commit is contained in:
47
Navidrome/docker-compose.yml
Normal file
47
Navidrome/docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
navidrome:
|
||||
container_name: navidrome
|
||||
image: deluan/navidrome:latest
|
||||
ports:
|
||||
- "4533:4533"
|
||||
restart: always
|
||||
environment:
|
||||
# 扫描音乐库的计划
|
||||
ND_SCANSCHEDULE: "@every 1h"
|
||||
# 日志级别
|
||||
ND_LOGLEVEL: "info"
|
||||
# 默认语言
|
||||
ND_DEFAULTLANGUAGE: "zh"
|
||||
# 会话超时时间
|
||||
ND_SESSIONTIMEOUT: "24h"
|
||||
# 启用下载功能
|
||||
ND_ENABLEDOWNLOADS: "true"
|
||||
# 启用收藏夹
|
||||
ND_ENABLEFAVOURITES: "true"
|
||||
# 启用共享功能
|
||||
ND_ENABLESHARING: "false"
|
||||
# 在 UI 中启用5星评级
|
||||
ND_ENABLESTARRATING: "true"
|
||||
# 启用转码配置
|
||||
ND_ENABLETRANSCODINGCONFIG: "true"
|
||||
# 转码缓存大小
|
||||
ND_TRANSCODINGCACHESIZE: "2000M"
|
||||
# 图片缓存大小
|
||||
ND_IMAGECACHESIZE: "1000M"
|
||||
# 音乐文件路径
|
||||
ND_MUSICFOLDER: "/music"
|
||||
# 数据路径
|
||||
ND_DATAFOLDER: "/data"
|
||||
volumes:
|
||||
# 将宿主机的数据目录挂载到容器的数据目录,用于数据持久化
|
||||
- "./data:/data"
|
||||
# 将宿主机的音乐目录挂载到容器的音乐目录,只读模式
|
||||
- "./music:/music:ro"
|
||||
networks:
|
||||
- navidrome-net
|
||||
|
||||
networks:
|
||||
navidrome-net:
|
||||
driver: bridge
|
||||
@@ -27,6 +27,16 @@ remotePort = 443
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,14 +4,18 @@
|
||||
# - `~/.headscale`
|
||||
# - 当前工作目录
|
||||
|
||||
#
|
||||
# https://myheadscale.example.com:443
|
||||
#
|
||||
# 服务端URL(客户端将连接到的地址)
|
||||
server_url: http://0.0.0.0:8080
|
||||
|
||||
# 服务监听地址
|
||||
listen_addr: 0.0.0.0:8080
|
||||
## 1. 更新Headscale配置启用HTTPS
|
||||
|
||||
# 修改server_url为HTTPS
|
||||
server_url: https://47.239.121.24:3009
|
||||
|
||||
# 启用HTTPS监听
|
||||
listen_addr: 0.0.0.0:8443
|
||||
|
||||
# 添加TLS配置
|
||||
tls_cert_path: "/var/lib/headscale/server.crt"
|
||||
tls_key_path: "/var/lib/headscale/server.key"
|
||||
|
||||
# 指标监听地址(建议保持内网访问)
|
||||
metrics_listen_addr: 127.0.0.1:9090
|
||||
@@ -123,7 +127,7 @@ database:
|
||||
# # in the 'ssl' field. Refers to https://www.postgresql.org/docs/current/libpq-ssl.html Table 34.1.
|
||||
# ssl: false
|
||||
|
||||
### TLS configuration
|
||||
### TLS configuration - 已注释掉,调试后再启用
|
||||
#
|
||||
## Let's encrypt / ACME
|
||||
#
|
||||
@@ -131,31 +135,31 @@ database:
|
||||
# TLS for a domain with Let's Encrypt.
|
||||
#
|
||||
# URL to ACME directory
|
||||
acme_url: https://acme-v02.api.letsencrypt.org/directory
|
||||
# acme_url: https://acme-v02.api.letsencrypt.org/directory
|
||||
|
||||
# Email to register with ACME provider
|
||||
acme_email: ""
|
||||
# acme_email: ""
|
||||
|
||||
# Domain name to request a TLS certificate for:
|
||||
tls_letsencrypt_hostname: ""
|
||||
# tls_letsencrypt_hostname: ""
|
||||
|
||||
# Path to store certificates and metadata needed by
|
||||
# letsencrypt
|
||||
# For production:
|
||||
tls_letsencrypt_cache_dir: /var/lib/headscale/cache
|
||||
# tls_letsencrypt_cache_dir: /var/lib/headscale/cache
|
||||
|
||||
# Type of ACME challenge to use, currently supported types:
|
||||
# HTTP-01 or TLS-ALPN-01
|
||||
# See: docs/ref/tls.md for more information
|
||||
tls_letsencrypt_challenge_type: HTTP-01
|
||||
# tls_letsencrypt_challenge_type: HTTP-01
|
||||
# When HTTP-01 challenge is chosen, letsencrypt must set up a
|
||||
# verification endpoint, and it will be listening on:
|
||||
# :http = port 80
|
||||
tls_letsencrypt_listen: ":http"
|
||||
# tls_letsencrypt_listen: ":http"
|
||||
|
||||
## Use already defined certificates:
|
||||
tls_cert_path: ""
|
||||
tls_key_path: ""
|
||||
# tls_cert_path: ""
|
||||
# tls_key_path: ""
|
||||
|
||||
log:
|
||||
# Output formatting for logs: text or json
|
||||
@@ -181,7 +185,7 @@ policy:
|
||||
#
|
||||
# - https://tailscale.com/kb/1054/dns/
|
||||
# - https://tailscale.com/kb/1081/magicdns/
|
||||
# - https://tailscale.com/blog/2021-09-private-dns-with-magicdns/
|
||||
# - https://tailscale.com/blog/2021-09-private-dns-withmagicdns/
|
||||
#
|
||||
# Please note that for the DNS configuration to have any effect,
|
||||
# clients must have the `--accept-dns=true` option enabled. This is the
|
||||
@@ -210,8 +214,7 @@ dns:
|
||||
nameservers:
|
||||
global:
|
||||
- 114.114.114.114
|
||||
|
||||
|
||||
|
||||
# NextDNS (see https://tailscale.com/kb/1218/nextdns/).
|
||||
# "abc123" is example NextDNS ID, replace with yours.
|
||||
# - https://dns.nextdns.io/abc123
|
||||
@@ -249,7 +252,7 @@ dns:
|
||||
# Note: for production you will want to set this to something like:
|
||||
unix_socket: /var/run/headscale/headscale.sock
|
||||
unix_socket_permission: "0770"
|
||||
#
|
||||
|
||||
# headscale supports experimental OpenID connect support,
|
||||
# it is still being tested and might have some bugs, please
|
||||
# help us test it.
|
||||
|
||||
@@ -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