docker-gitolite icon indicating copy to clipboard operation
docker-gitolite copied to clipboard

[wishlist] Add option to use custom gitolite.rc

Open iu-guest opened this issue 7 years ago • 2 comments

As far as I can tell {experiments, but no pointers to gitolite documentation}, gitolite setup command overrides whatever /var/lib/git/.gitolite.rc file was there, as such following Dockerfile

FROM jgiannuzzi/gitolite
COPY gitolite.rc /var/lib/git/.gitolite.rc

does not work as intended. Could you please add option to provide custom .gitolite.rc?

iu-guest avatar Jun 03 '18 09:06 iu-guest

Hi @iu-guest,

The idea is to run the setup once, as per the README. This will create everything you need in the gitolite-git volume (or whatever name you gave to the volume holding /var/lib/git).

You can then simply edit the .gitolite.rc file in there (by mounting the volume in another container, or by exec-ing in your gitolite container), and restart/recreate your gitolite container.

jgiannuzzi avatar Jul 27 '18 11:07 jgiannuzzi

Hi @iu-guest,

The idea is to run the setup once, as per the README. This will create everything you need in the gitolite-git volume (or whatever name you gave to the volume holding /var/lib/git).

You can then simply edit the .gitolite.rc file in there (by mounting the volume in another c ontainer, or by exec-ing in your gitolite container), and restart/recreate your gitolite conta iner.

Yes, sure. But I like to have `docker-compose.yml', such that 'docker-compose up --build' will have everything up and running, without additional tweaking.

What about adding something like following at the end of init script?

# ... setup gitolite as usual
if [ -f /gitolite.rc-override ] ; then
	cp /gitolite.rc-override /var/lib/git/.gitolite.rc
fi
# exec ssh server

iu-guest avatar Jul 29 '18 19:07 iu-guest