Adds a new brencher environment docker_socket_proxy so the brencher pipeline can deploy tecnativa/docker-socket-proxy as part of the hermes_squid stack (per admin/ansible#1), and registers it in the backend's PROFILES env var.
Also migrates the new config to the remotes=[{name, url}, ...] form introduced by PR #3 (named-remotes) — this PR's branch is rebased on top of the merge of #3 into admin/brencher:main.
What's in this PR
backend/configs/docker_socket_proxy.py — new config, modeled on backend/configs/registry.py
single-service swarm stack, no build step
clone declares two named remotes:
gitea_hermes → https://gitea.rudolf.keenetic.link/hermes/ansible (where this PR's branch lives)
gitea_admin → https://gitea.rudolf.keenetic.link/admin/ansible (the live-deploy source)
branchNamePrefix is intentionally dropped: GitClone only applies its prefix refspec to a remote named origin (see backend/steps/git.py ~L104), and neither of our two remotes is named origin. Both remotes fetch their full refset instead.
deployDocker runs docker stack deploy docker_socket_proxy with compose at hermes_squid/stack-compose.yml (the proxy is inlined into the hermes_squid stack in admin/ansible#1, not its own standalone stack)
UrlCheck against http://127.0.0.1:2375/_ping (the only endpoint enabled by the upstream image by default)
docker-compose.yml — adds docker_socket_proxy to the PROFILES env var
without this line the new config file would land in the container but backend/app.py would skip it (os.getenv('PROFILES', '') → build_environments() → parse_arguments() filters by includes); brencher would never instantiate the new environment
Scope decision: only this config was migrated to remotes=
The other open configs (registry.py, gitea.py, hermes.py, hermes_infra.py, immich.py, gmail_mcp.py, torrserv_proxy.py) still use the legacy url= / branchNamePrefix= form and are intentionally left untouched. Migrating them all is out of scope for this PR.
Why no github.com remote
An earlier iteration included https://github.com/rudolf1/ansible.git as a "read-only mirror / fallback". That was removed in commit 653aee9: github.com is unreachable from the brencher container (proxy returns HTTP 403 on CONNECT tunnel), so the entry would always fail to fetch and leave the deploy with one fewer remote than expected. The two gitea remotes cover the same intent.
How it integrates with the ansible PR
PR #1 in admin/ansible (head 449cbaa) inlines docker_socket_proxy as a service inside hermes_squid/stack-compose.yml. Once both PRs are merged:
brencher-bot clones both remotes of the ansible repo into a temp checkout
DockerSwarmDeploy runs docker stack deploy docker_socket_proxy from hermes_squid/stack-compose.yml
because the proxy joins the admin overlay, it's reachable to every hermes_infra service as tcp://docker_socket_proxy:2375 without needing to attach to any extra overlay network
Verification (sandbox, no docker daemon available — proxy/deploy steps need a real swarm)
python3 -m py_compile backend/configs/docker_socket_proxy.py — OK
AST structural check: 5 expected imports, __all__ == ["docker_socket_proxy"], Environment(...) constructed with id="docker_socket_proxy" and a pipeline of 8 named steps — OK
Real import via the same path app.py uses (backend/ on sys.path):
from configs import docker_socket_proxy succeeds
env.id == "docker_socket_proxy"
clone.remotes is a 2-entry list [gitea_hermes, gitea_admin], clone.urls derived from it
no github.com substring anywhere in the constructed config
End-to-end smoke test: built a parallel GitClone(remotes=[...]) with the same two URLs pointed at file:///tmp/ansible-upstream, ran clone.progress():
both named remotes created in the temp clone
feat/docker-socket-proxy discovered under both (gitea_admin/feat/docker-socket-proxy, gitea_hermes/feat/docker-socket-proxy)
pytest: 26/26 passed on the no-docker / no-playwright suite (test_dummy, test_caching_step, test_cached_env, test_git_integration) — including the integration tests that exercise GitClone / CheckoutMerged / GitUnmerge
mypy --no-incremental --follow-imports=silent: Success: no issues found in 1 source file (control on registry.py also clean)
end-to-end docker stack deploy docker_socket_proxy — needs the swarm + the ansible PR merged
HTTPS clone from gitea on the live brencher-bot — requires the brencher container's git credentials to have push rights on admin/ansible (the live-deploy source). Sandbox can't simulate this.
After both PRs merge
The proxy joins the existing admin overlay when hermes_squid deploys, so no manual docker network create step is needed (the overlay already exists for hermes_infra). The proxy binds 2375/tcp on the swarm manager (odroid) via mode: host.
Commit history (for reviewers)
This branch was rebased onto upstream/main after PR #3 landed, then merged with the prior remote tip via a non-fast-forward merge commit to preserve history. Final structure:
* 8bd6715 (HEAD -> feat/docker-socket-proxy-config, origin/feat/docker-socket-proxy-config)
fix(configs): point docker_socket_proxy at hermes_squid/stack-compose.yml
* 653aee9 fix(configs): drop unreachable github.com remote from docker_socket_proxy
* 20a6ed0 Merge branch 'feat/docker-socket-proxy-config' of .../hermes/brencher
|\
| * 5eb9f0c feat(configs): add docker_socket_proxy environment (prior remote tip -- superseded by 9ef55e5)
* | c120040 feat(configs): switch docker_socket_proxy to named remotes (rebased on top of PR #3)
* | 9ef55e5 feat(configs): add docker_socket_proxy environment (rebased config + PROFILES)
|/
* e533174 Allow naming each GitClone remote explicitly (#3)
## Summary
Adds a new brencher environment `docker_socket_proxy` so the brencher pipeline can deploy `tecnativa/docker-socket-proxy` as part of the `hermes_squid` stack (per `admin/ansible#1`), and registers it in the backend's `PROFILES` env var.
Also migrates the new config to the `remotes=[{name, url}, ...]` form introduced by PR #3 (named-remotes) — this PR's branch is rebased on top of the merge of #3 into `admin/brencher:main`.
## What's in this PR
- `backend/configs/docker_socket_proxy.py` — new config, modeled on `backend/configs/registry.py`
- single-service swarm stack, no build step
- `clone` declares **two** named remotes:
- `gitea_hermes` → `https://gitea.rudolf.keenetic.link/hermes/ansible` (where this PR's branch lives)
- `gitea_admin` → `https://gitea.rudolf.keenetic.link/admin/ansible` (the live-deploy source)
- `branchNamePrefix` is intentionally **dropped**: GitClone only applies its prefix refspec to a remote named `origin` (see `backend/steps/git.py` ~L104), and neither of our two remotes is named `origin`. Both remotes fetch their full refset instead.
- `deployDocker` runs `docker stack deploy docker_socket_proxy` with compose at **`hermes_squid/stack-compose.yml`** (the proxy is inlined into the hermes_squid stack in `admin/ansible#1`, not its own standalone stack)
- `UrlCheck` against `http://127.0.0.1:2375/_ping` (the only endpoint enabled by the upstream image by default)
- `docker-compose.yml` — **adds `docker_socket_proxy` to the `PROFILES` env var**
- without this line the new config file would land in the container but `backend/app.py` would skip it (`os.getenv('PROFILES', '')` → `build_environments()` → `parse_arguments()` filters by `includes`); brencher would never instantiate the new environment
## Scope decision: only this config was migrated to `remotes=`
The other open configs (`registry.py`, `gitea.py`, `hermes.py`, `hermes_infra.py`, `immich.py`, `gmail_mcp.py`, `torrserv_proxy.py`) still use the legacy `url=` / `branchNamePrefix=` form and are intentionally left untouched. Migrating them all is out of scope for this PR.
## Why no `github.com` remote
An earlier iteration included `https://github.com/rudolf1/ansible.git` as a "read-only mirror / fallback". That was removed in commit `653aee9`: github.com is unreachable from the brencher container (proxy returns HTTP 403 on CONNECT tunnel), so the entry would always fail to fetch and leave the deploy with one fewer remote than expected. The two gitea remotes cover the same intent.
## How it integrates with the ansible PR
PR #1 in `admin/ansible` (head `449cbaa`) inlines `docker_socket_proxy` as a service inside `hermes_squid/stack-compose.yml`. Once both PRs are merged:
- `brencher-bot` clones both remotes of the `ansible` repo into a temp checkout
- `DockerSwarmDeploy` runs `docker stack deploy docker_socket_proxy` from `hermes_squid/stack-compose.yml`
- because the proxy joins the `admin` overlay, it's reachable to every hermes_infra service as `tcp://docker_socket_proxy:2375` without needing to attach to any extra overlay network
## Verification (sandbox, no docker daemon available — proxy/deploy steps need a real swarm)
- `python3 -m py_compile backend/configs/docker_socket_proxy.py` — OK
- AST structural check: 5 expected imports, `__all__ == ["docker_socket_proxy"]`, `Environment(...)` constructed with `id="docker_socket_proxy"` and a pipeline of 8 named steps — OK
- Real import via the same path `app.py` uses (`backend/` on `sys.path`):
- `from configs import docker_socket_proxy` succeeds
- `env.id == "docker_socket_proxy"`
- `clone.remotes` is a 2-entry list `[gitea_hermes, gitea_admin]`, `clone.urls` derived from it
- no `github.com` substring anywhere in the constructed config
- `deployDocker.docker_compose_path == "hermes_squid/stack-compose.yml"`
- `env.pipeline == [GitClone, SharedStateHolderInMemory, CheckoutMerged, DockerSwarmCheck, GitUnmerge, DockerSwarmDeploy, UrlCheck, SimpleLog]`
- **End-to-end smoke test**: built a parallel `GitClone(remotes=[...])` with the same two URLs pointed at `file:///tmp/ansible-upstream`, ran `clone.progress()`:
- both named remotes created in the temp clone
- `feat/docker-socket-proxy` discovered under both (`gitea_admin/feat/docker-socket-proxy`, `gitea_hermes/feat/docker-socket-proxy`)
- pytest: 26/26 passed on the no-docker / no-playwright suite (`test_dummy`, `test_caching_step`, `test_cached_env`, `test_git_integration`) — including the integration tests that exercise `GitClone` / `CheckoutMerged` / `GitUnmerge`
- mypy `--no-incremental --follow-imports=silent`: `Success: no issues found in 1 source file` (control on `registry.py` also clean)
- `docker-compose.yml` PROFILES line: structurally validated (8 entries, single PROFILES line, `docker_socket_proxy` present)
## What was NOT verified in the sandbox
- `test_apply_changes.py`, `test_deploy_column_playwright.py`, `test_dry_run_playwright.py` — require playwright
- `test_containertest.py` — requires a docker daemon
- `test_remote_repo.py`, `test_processing_initial_branches.py` — require the `uber_backup` git remote + brencher creds
- end-to-end `docker stack deploy docker_socket_proxy` — needs the swarm + the ansible PR merged
- HTTPS clone from gitea on the live brencher-bot — requires the brencher container's git credentials to have push rights on `admin/ansible` (the live-deploy source). Sandbox can't simulate this.
## After both PRs merge
The proxy joins the existing `admin` overlay when `hermes_squid` deploys, so no manual `docker network create` step is needed (the overlay already exists for `hermes_infra`). The proxy binds `2375/tcp` on the swarm manager (odroid) via `mode: host`.
## Commit history (for reviewers)
This branch was rebased onto `upstream/main` after PR #3 landed, then merged with the prior remote tip via a non-fast-forward merge commit to preserve history. Final structure:
```
* 8bd6715 (HEAD -> feat/docker-socket-proxy-config, origin/feat/docker-socket-proxy-config)
fix(configs): point docker_socket_proxy at hermes_squid/stack-compose.yml
* 653aee9 fix(configs): drop unreachable github.com remote from docker_socket_proxy
* 20a6ed0 Merge branch 'feat/docker-socket-proxy-config' of .../hermes/brencher
|\
| * 5eb9f0c feat(configs): add docker_socket_proxy environment (prior remote tip -- superseded by 9ef55e5)
* | c120040 feat(configs): switch docker_socket_proxy to named remotes (rebased on top of PR #3)
* | 9ef55e5 feat(configs): add docker_socket_proxy environment (rebased config + PROFILES)
|/
* e533174 Allow naming each GitClone remote explicitly (#3)
```
Single-service swarm stack that runs tecnativa/docker-socket-proxy
on the odroid manager. Modeled on backend/configs/registry.py --
no build step, no healthcheck UrlCheck against an external URL
(the proxy only exposes the host Docker socket, no HTTP UI).
Standalone: based on admin/brencher main, mirrors the same clone URL
(github.com/rudolf1/uber_backup.git) as the other open configs.
Once admin/brencher#3 (named-remotes) merges, the URL can be switched
to the gitea mirror in a follow-up.
Pipeline:
clone -> state -> checkoutMerged -> swarmCheck -> unmerge ->
deploy (compose at docker_socket_proxy/stack-compose.yml) ->
UrlCheck(/_ping) -> logUrls
Also adds 'docker_socket_proxy' to the PROFILES env var in the
root docker-compose.yml so the brencher backend instantiates this
config on startup -- without it, the new file would be installed
in the container but never loaded by discover_envs.build_environments().
Deployment is gated by the existing admin/ansible PR #1, which
adds the actual docker_socket_proxy/stack-compose.yml file.
Single-service swarm stack that runs tecnativa/docker-socket-proxy
on the odroid manager. Modeled on backend/configs/registry.py --
no build step, no healthcheck UrlCheck against an external URL
(the proxy only exposes the host Docker socket, no HTTP UI).
Standalone: based on admin/brencher main, mirrors the same clone URL
(github.com/rudolf1/uber_backup.git) as the other open configs.
Once admin/brencher#3 (named-remotes) merges, the URL can be switched
to the gitea mirror in a follow-up.
Pipeline:
clone -> state -> checkoutMerged -> swarmCheck -> unmerge ->
deploy (compose at docker_socket_proxy/stack-compose.yml) ->
UrlCheck(/_ping) -> logUrls
Also adds 'docker_socket_proxy' to the PROFILES env var in the
root docker-compose.yml so the brencher backend instantiates this
config on startup -- without it, the new file would be installed
in the container but never loaded by discover_envs.build_environments().
Deployment is gated by the existing admin/ansible PR #1, which
adds the actual docker_socket_proxy/stack-compose.yml file.
After PR #3 (named-remotes) merged into admin/brencher:main, GitClone
gained a remotes=[{name, url}, ...] form. Switch this config from
the legacy url=/branchNamePrefix form to the new explicit form.
Three remotes declared:
- gitea_hermes: where this branch lives (hermes/ansible:feat/docker-socket-proxy)
- gitea_admin: the live-deploy source
- github: read-only mirror / fallback
branchNamePrefix is dropped: GitClone only applies its prefix refspec
to a remote named 'origin' (backend/steps/git.py line ~104), and none
of our remotes is named 'origin'. The other open configs (registry.py,
gitea.py, hermes.py, hermes_infra.py, immich.py, gmail_mcp.py,
torrserv_proxy.py) still use the old form and are intentionally left
untouched -- this PR keeps the migration scope narrow.
Smoke test: GitClone.progress() with these three remotes against a
local file:// mirror clones successfully and discovers
feat/docker-socket-proxy on all three remotes.
The previous commit added a github.com/rudolf1/ansible.git entry to the
remotes= list as a 'read-only mirror / fallback for code review'.
That was wrong: github.com is unreachable from the brencher container
(proxy returns HTTP 403 on CONNECT tunnel). The remote would always fail
to fetch, leaving the deploy step with only one good remote out of two.
Drop the github entry. The two gitea remotes (gitea_hermes + gitea_admin)
cover the same intent -- primary fork + live-deploy source.
No behavior change in any test -- the integration tests already use
local file:// URLs, so the github URL was never exercised.
The ansible PR #1 was refactored: instead of a standalone
docker_socket_proxy/stack-compose.yml stack, the proxy is now
inlined as a new service inside hermes_squid/stack-compose.yml
so it deploys + tears down with the rest of hermes_infra.
This config's docker_compose_path needs to follow it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds a new brencher environment
docker_socket_proxyso the brencher pipeline can deploytecnativa/docker-socket-proxyas part of thehermes_squidstack (peradmin/ansible#1), and registers it in the backend'sPROFILESenv var.Also migrates the new config to the
remotes=[{name, url}, ...]form introduced by PR #3 (named-remotes) — this PR's branch is rebased on top of the merge of #3 intoadmin/brencher:main.What's in this PR
backend/configs/docker_socket_proxy.py— new config, modeled onbackend/configs/registry.pyclonedeclares two named remotes:gitea_hermes→https://gitea.rudolf.keenetic.link/hermes/ansible(where this PR's branch lives)gitea_admin→https://gitea.rudolf.keenetic.link/admin/ansible(the live-deploy source)branchNamePrefixis intentionally dropped: GitClone only applies its prefix refspec to a remote namedorigin(seebackend/steps/git.py~L104), and neither of our two remotes is namedorigin. Both remotes fetch their full refset instead.deployDockerrunsdocker stack deploy docker_socket_proxywith compose athermes_squid/stack-compose.yml(the proxy is inlined into the hermes_squid stack inadmin/ansible#1, not its own standalone stack)UrlCheckagainsthttp://127.0.0.1:2375/_ping(the only endpoint enabled by the upstream image by default)docker-compose.yml— addsdocker_socket_proxyto thePROFILESenv varbackend/app.pywould skip it (os.getenv('PROFILES', '')→build_environments()→parse_arguments()filters byincludes); brencher would never instantiate the new environmentScope decision: only this config was migrated to
remotes=The other open configs (
registry.py,gitea.py,hermes.py,hermes_infra.py,immich.py,gmail_mcp.py,torrserv_proxy.py) still use the legacyurl=/branchNamePrefix=form and are intentionally left untouched. Migrating them all is out of scope for this PR.Why no
github.comremoteAn earlier iteration included
https://github.com/rudolf1/ansible.gitas a "read-only mirror / fallback". That was removed in commit653aee9: github.com is unreachable from the brencher container (proxy returns HTTP 403 on CONNECT tunnel), so the entry would always fail to fetch and leave the deploy with one fewer remote than expected. The two gitea remotes cover the same intent.How it integrates with the ansible PR
PR #1 in
admin/ansible(head449cbaa) inlinesdocker_socket_proxyas a service insidehermes_squid/stack-compose.yml. Once both PRs are merged:brencher-botclones both remotes of theansiblerepo into a temp checkoutDockerSwarmDeployrunsdocker stack deploy docker_socket_proxyfromhermes_squid/stack-compose.ymladminoverlay, it's reachable to every hermes_infra service astcp://docker_socket_proxy:2375without needing to attach to any extra overlay networkVerification (sandbox, no docker daemon available — proxy/deploy steps need a real swarm)
python3 -m py_compile backend/configs/docker_socket_proxy.py— OK__all__ == ["docker_socket_proxy"],Environment(...)constructed withid="docker_socket_proxy"and a pipeline of 8 named steps — OKapp.pyuses (backend/onsys.path):from configs import docker_socket_proxysucceedsenv.id == "docker_socket_proxy"clone.remotesis a 2-entry list[gitea_hermes, gitea_admin],clone.urlsderived from itgithub.comsubstring anywhere in the constructed configdeployDocker.docker_compose_path == "hermes_squid/stack-compose.yml"env.pipeline == [GitClone, SharedStateHolderInMemory, CheckoutMerged, DockerSwarmCheck, GitUnmerge, DockerSwarmDeploy, UrlCheck, SimpleLog]GitClone(remotes=[...])with the same two URLs pointed atfile:///tmp/ansible-upstream, ranclone.progress():feat/docker-socket-proxydiscovered under both (gitea_admin/feat/docker-socket-proxy,gitea_hermes/feat/docker-socket-proxy)test_dummy,test_caching_step,test_cached_env,test_git_integration) — including the integration tests that exerciseGitClone/CheckoutMerged/GitUnmerge--no-incremental --follow-imports=silent:Success: no issues found in 1 source file(control onregistry.pyalso clean)docker-compose.ymlPROFILES line: structurally validated (8 entries, single PROFILES line,docker_socket_proxypresent)What was NOT verified in the sandbox
test_apply_changes.py,test_deploy_column_playwright.py,test_dry_run_playwright.py— require playwrighttest_containertest.py— requires a docker daemontest_remote_repo.py,test_processing_initial_branches.py— require theuber_backupgit remote + brencher credsdocker stack deploy docker_socket_proxy— needs the swarm + the ansible PR mergedadmin/ansible(the live-deploy source). Sandbox can't simulate this.After both PRs merge
The proxy joins the existing
adminoverlay whenhermes_squiddeploys, so no manualdocker network createstep is needed (the overlay already exists forhermes_infra). The proxy binds2375/tcpon the swarm manager (odroid) viamode: host.Commit history (for reviewers)
This branch was rebased onto
upstream/mainafter PR #3 landed, then merged with the prior remote tip via a non-fast-forward merge commit to preserve history. Final structure:b441cc1e5bto5eb9f0c840Pull request closed