From 5bcab16ad2981756024aa813c984e63ea41921fa Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 7 Apr 2021 05:30:04 +0300 Subject: README: update --- README.md | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c8f9bd6..adb4b8c 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,13 @@ cgitize Mirror your git repositories and make them cgit-ready. +Example output can be found at https://egort.name/git/. + Usage ----- -Adjust the config in [examples/cgitize.conf] and pass it using the -`--config` parameter: +Adjust the sample config in [examples/cgitize.conf] and pass its path as the +`--config` parameter value: > python3 -m cgitize.main --config path/to/cgitize.conf @@ -26,12 +28,10 @@ Make sure the required keys are loaded to a ssh-agent. ### Docker The image is **egortensin/cgitize**. -The container reads the config from */etc/cgitize/cgitize.conf* and -writes the repositories to */var/tmp/cgitize/output*. +The container reads the config from /etc/cgitize/cgitize.conf and writes the +repositories to /var/tmp/cgitize/output. If SSH is required, the socket should be mapped to -*/var/run/cgitize/ssh-agent.sock*. - -For example: +/var/run/cgitize/ssh-agent.sock. > docker run -it --rm \ -v "/path/to/config:/etc/cgitize:ro" \ @@ -39,12 +39,15 @@ For example: -v "/path/to/output:/var/tmp/cgitize/output" \ egortensin/cgitize -### my_repos.py +The container executes cgitize inside a cron job. +The `SCHEDULE` environment variable controls the period between cgitize runs. +By default, it's set to `once`, which makes the container exit after the first +run. +You can also set it to `15min`, `hourly`, `daily`, `weekly`, `monthly` or a +custom 5-part cron schedule like `*/5 * * * *`. -Change the section to which the repository belongs to using `cp --archive` (so -that the "Idle" column isn't updated): - - > cp --archive -- section1/repo section2/ +Mirror maintenance +------------------ Update the URL of an existing repository mirror: @@ -53,17 +56,11 @@ Update the URL of an existing repository mirror: Development ----------- -### Docker - -To build an image: - - > make docker/build - ### Linting Requires [Pylint]. - > pylint cgit + > pylint cgitize [Pylint]: https://www.pylint.org/ -- cgit v1.2.3