Files
secgate-vpn-docker/docker-compose.yml
T
yuez cf2bbbb3d9 feat(ci): main 分支构建镜像并发布到 GHCR
- .github/workflows/docker.yml:push main / tag v* 构建 linux/amd64 镜像推
  ghcr.io/zgs225/secgate-vpn-docker(latest、客户端版本、sha-、semver tag),
  PR 只构建 + 冒烟检查;厂商 deb 由 fetch-client-deb.sh 在 CI 取包并校验,按
  版本缓存
- compose/Makefile/deploy-nas.sh 默认镜像改为 ghcr.io,新增 make pull,
  NAS 部署优先 docker pull,失败再回退 save/load
- README/SECURITY/vendor 文档补充 GHCR 用法与包可见性说明
- Dockerfile 补 OCI source/url/licenses 标签
2026-11-13 16:12:38 +08:00

50 lines
1.4 KiB
YAML

services:
# 默认服务:图形客户端 + noVNC + SOCKS5(二次认证只能在这个界面里点)
secgate-gui:
# 默认用 GitHub Actions 发布到 GHCR 的镜像;本地 build 会打成同一个 tag。
# 想换 tag/仓库:SECGATE_IMAGE=ghcr.io/<owner>/<repo>:<tag> make up
image: ${SECGATE_IMAGE:-ghcr.io/zgs225/secgate-vpn-docker:latest}
build:
context: .
dockerfile: Dockerfile
container_name: secgate-gui
hostname: secgate-gui
restart: unless-stopped
init: true
# 客户端要建 tun0、改路由、改 /etc/resolv.conf
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
environment:
TZ: Asia/Shanghai
SCREEN: "1280x800x24"
ports:
# noVNC(浏览器桌面)与 SOCKS5 都只监听回环:
# 无认证,别直接暴露到局域网。远程用 ssh -L 6080:127.0.0.1:6080 隧道。
- "127.0.0.1:6080:6080"
- "127.0.0.1:1080:1080"
volumes:
- ./runtime:/opt/sslvpnclient/runtime
- ./log:/opt/sslvpnclient/log
- ./root-home:/root
shm_size: "512m"
healthcheck:
test: ["CMD-SHELL", "pgrep -x Xvfb >/dev/null && pgrep -f 'files/bin/sslvpn' >/dev/null"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "2"