← 返回
未分类 中文

Proxy Manager

Manage the shared nginx-proxy Docker container and its network connections. Auto-discovers app containers via VIRTUAL_HOST labels. Start this first — it crea...
管理共享的 nginx‑proxy Docker 容器及其网络连接。通过 VIRTUAL_HOST标签自动发现应用容器。先启动它——它会创建共享网络。
pereirajair pereirajair 来源
未分类 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 327
下载
💾 1
安装
1
版本
#latest

概述

Proxy Manager

Manages the shared nginx-proxy Docker container (jwilder/nginx-proxy) and the Docker network (nginx-proxy_net) used by all dev instances.

The proxy auto-discovers containers with VIRTUAL_HOST labels and creates routes. It also owns the shared Docker network that allows MySQL and app containers to communicate.

Architecture

proxy-manager/
├── docker-compose.yml   # nginx-proxy container + codai_net network
└── run.sh               # lifecycle + network connection CLI

Start order: proxy-manager first (creates the network), then mysql-manager, then worktree-manager.

Commands

./run.sh start                      # start nginx-proxy (creates codai_net network)
./run.sh stop                       # stop nginx-proxy
./run.sh status                     # show status, connected networks, active routes
./run.sh connect <instance>         # connect proxy to instance's Docker network
./run.sh disconnect <instance>      # disconnect proxy from instance network
./run.sh auto-connect               # connect proxy to ALL project networks
./run.sh reload                     # reload nginx config without restart

How to Execute Tasks

First-time setup

cd proxy-manager && ./run.sh start

Creates the shared nginx-proxy_net Docker network and starts the proxy on port 80.

After starting an app instance

After worktree-manager start , connect the proxy so routes become available:

./run.sh connect <name>

Routes: http://.frontend.localhost and http://.backend.localhost

After restarting Docker or the host

Proxy reconnects automatically via restart: unless-stopped. If routes are missing, run:

./run.sh auto-connect

Check active routes

./run.sh status

Startup Order

  1. proxy-manager start — creates network, starts proxy
  2. mysql-manager start — joins the shared network
  3. worktree-manager start — starts app containers
  4. proxy-manager connect — activates routing

Configuration

VariableDefaultPurpose
-------------------------------------------------------------------------
PROXY_CONTAINERcodai_nginx_proxynginx-proxy container name
CODAI_NETWORKnginx-proxy_netShared Docker network name
PROJECT_PREFIXcodai-devDocker Compose project prefix

How VIRTUAL_HOST Routing Works

  1. App containers declare VIRTUAL_HOST=.frontend.localhost as a label
  2. jwilder/nginx-proxy reads Docker socket events and generates nginx config
  3. Proxy container must share at least one Docker network with the app container
  4. ./run.sh connect connects proxy to the instance's network

Security Notes

  • Docker socket: The proxy mounts /var/run/docker.sock:ro to auto-discover containers. This is required for VIRTUAL_HOST routing but grants the container read access to Docker daemon state. Only run on trusted development machines.
  • Port 80: Bound to 127.0.0.1 — routes are reachable from the host only, not from other machines on the network.
  • Image provenance: Pinned to jwilder/nginx-proxy:1.3.1. Review image updates before pulling a newer tag.

Rules

  • Start proxy-manager before mysql-manager and worktree-manager.
  • After worktree-manager start , always run proxy-manager connect to activate routes.
  • auto-connect only connects to networks matching PROJECT_PREFIX and requires confirmation — use connect for targeted single-instance connections.
  • stop does NOT remove the Docker network. Other containers on the network remain reachable.
  • The container uses restart: unless-stopped — it survives Docker daemon restarts. Run ./run.sh stop when done.

Related Plugins

  • mysql-manager — shared MySQL container (start after proxy-manager)
  • worktree-manager — app instances and git worktrees (start after both)

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-12 05:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 31,094
dev-programming

Postgres Manager

pereirajair
管理共享的 PostgreSQL Docker 容器,用于本地开发环境。处理容器生命周期、数据库创建/删除以及跨实例数据转储,...
★ 0 📥 452
it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 472 📥 78,659