创建docker 编排文件
ymlversion: '3.8'
services:
speedtest:
image: ghcr.io/librespeed/speedtest
container_name: speedtest_container
environment:
- MODE=frontend
- TITLE=青菜的测速系统
- [email protected]
- TELEMETRY=true
- ENABLE_ID_OBFUSCATION=true
- PASSWORD=123456
- WEBPORT=80
ports:
- "8099:80"
volumes:
- ./servers.json:/servers.json
- ./database/:/database
tty: true
启动后会监控一个http的8099端口,请自行进行反代。
使用badapple9/speedtest-x提供的镜像搭建,官方的镜像有点问题
docker run -d -p 8099:80 -e MAX_LOG_COUNT=1000 -e IP_SERVICE=ip.sb -e SAME_IP_MULTI_LOGS=false -it badapple9/speedtest-x
编辑/etc/caddy/Caddyfile文件。此处下载的caddy已经集成了cloudflare DNS申请证书的插件。
{ https_port 8098 auto_https disable_redirects } youdomain.com { tls { dns cloudflare ********-********* } reverse_proxy 127.0.0.1:8099 }
caddy.service[Unit] Description=Caddy Documentation=https://caddyserver.com/docs/ After=network.target network-online.target Requires=network-online.target [Service] Type=notify User=root Group=root ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force TimeoutStopSec=5s LimitNOFILE=1048576 PrivateTmp=true ProtectSystem=full AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE [Install] WantedBy=multi-user.target