- supervisor: central supervisor for to control all remote hosts and repos
src/check-push.sh: main logic of the engine, can be called by web hook or by timer loop- gh-webhook: hook service to listen for github.com callbacks. Once triggered, will run check-push.sh shell script to have one-shot check.
- Sample settings in docker-compose.yml in the code tree.
- Volume to store all the data: git_repos, (code)copies, scripts.
- Volumn to store the ssh keys to access github.com repos.
It's the default command entry for docker image, will listen on :9870 port.
If want to run a timer loop instead of web-hook, need to:
- Must set SLEEP_TIME env for docker-run, to specify the timeout values(seconds)
- Specify the command as
/srcripts/check-push.shfor docker-run - If no SLEEP_TIME env, the script will be run as one-shot checking.
- BR_WHITELIST: Space-separated branch names to track and copy by default (e.g.
main master dev). Override via env; default in script:main master dev test alpha. Whitelisted branches get their copy dir created and populated on first run; other branches are only tracked if a copy dir already exists (and then start with a.skippingflag until you remove it).
In HOST, under the path /git_repos/, just use the regular git clone the target repos.
All the scripts will be visible to HOST in the path: /scripts/.
The logic in the central check-push.sh script:
Flow
Sequence
The project uses a single source of truth for version: the VERSION file at the repo root (e.g. 1.0.0).
- Scripts: Run
check-push.sh --version/-Vprints it. In the Docker image,VERSIONis copied to/scripts/VERSION. - gh-webhook: Reads version from
/scripts/VERSIONat runtime.GET /versionreturns{"version": "1.0.0"}; webhook responses includeversionwhen available. - supervisor (Rust): Build reads
VERSIONfrom the repo root and sets the binary version;supervisor --versionshows it. IfVERSIONis missing,Cargo.tomlpackage version is used.
To set the version everywhere (e.g. for a release), run:
./scripts/set-version.sh 1.2.3This updates VERSION, supervisor/Cargo.toml, and gh-webhook/pyproject.toml.
- first time to launch all tests:
./tests/launch-testing.sh - if testing env is ready, to run:
./tests/scripts/test-check-push.sh - to clean up test env, to run:
./tests/scripts/cleanup-test.sh
After everytime to run the test scripts, the results can be checked in ./tests/work.test/copies/

