openfrontier / docker-gerrit

Build a Docker image with the Gerrit code review system
Apache License 2.0
196 stars 118 forks source link

Run initialisation if ${GERRIT_SITE}/git is empty #52

Closed mfmcdonagh closed 7 years ago

mfmcdonagh commented 7 years ago

Run initialisation if ${GERRIT_SITE}/git is empty, this will enable configuration files to be placed in ${GERRIT_SITE} without stopping the initialisation process from running.

I noticed this issue when I tried to to mount the replication.config file as a volume in docker-compose in order for docker-gerrit to consume, i.e

'/opt/gerrit/replication.config:/var/gerrit/review_site/etc/replication.config',

However this caused docker-gerrit to exit, I believe what is happening is the initialisation is not occurring because the /var/gerrit/review_site/etc/replication.config file is already present. This causes privilege problems later on which causes the container to exit.

thinkernel commented 7 years ago

Hi @iammarkmcd Thanks for this patch.