The problem is that on restart, the script tries again to create a bare repository, but it already exists.
The early versions had the line 'rm -rf $GIT_PROJECT_ROOT/*' in the script, but they removed it in commit 027e0e3.
Additionally, redirecting stderr to dev/null masks all errors and it is impossible to understand what went wrong.
Workaround
docker-compose.yml
entrypoint: >
sh -c "rm -rf /var/lib/git/* &&
entrypoint"
The problem is that on restart, the script tries again to create a bare repository, but it already exists. The early versions had the line 'rm -rf $GIT_PROJECT_ROOT/*' in the script, but they removed it in commit 027e0e3. Additionally, redirecting stderr to dev/null masks all errors and it is impossible to understand what went wrong.
Workaround
docker-compose.yml