cirocosta / gitserver-http

git-http-backend with repository initialization
MIT License
21 stars 22 forks source link

Not restarting in docker compose if there is an initial catalog #18

Open andrewvk opened 2 years ago

andrewvk commented 2 years ago

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"