{"id":16384450,"url":"https://github.com/luquedaniel/cgit-docker","last_synced_at":"2025-04-17T21:32:12.504Z","repository":{"id":145255046,"uuid":"518593472","full_name":"LuqueDaniel/cgit-docker","owner":"LuqueDaniel","description":"Cgit runing on Docker with fcgiwrap and NGINX","archived":false,"fork":false,"pushed_at":"2024-10-19T22:16:53.000Z","size":21,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T08:05:31.112Z","etag":null,"topics":["alpine","cgit","docker","docker-compose","docker-image","fcgiwrap","nginx"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuqueDaniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-27T19:51:55.000Z","updated_at":"2025-03-07T12:17:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"301a42f5-024e-4448-a002-6fe635643d2e","html_url":"https://github.com/LuqueDaniel/cgit-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuqueDaniel%2Fcgit-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuqueDaniel%2Fcgit-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuqueDaniel%2Fcgit-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuqueDaniel%2Fcgit-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuqueDaniel","download_url":"https://codeload.github.com/LuqueDaniel/cgit-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249381001,"owners_count":21261227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","cgit","docker","docker-compose","docker-image","fcgiwrap","nginx"],"created_at":"2024-10-11T04:11:30.706Z","updated_at":"2025-04-17T21:32:12.262Z","avatar_url":"https://github.com/LuqueDaniel.png","language":"Dockerfile","readme":"# Cgit Docker\n\n[![GitHub](https://img.shields.io/github/license/LuqueDaniel/cgit-docker?style=flat-square)](https://github.com/LuqueDaniel/cgit-docker/blob/main/LICENSE)\n\nDocker image for [Cgit](https://git.zx2c4.com/cgit/about/) a web interface for [Git](https://git-scm.com/) repositories.\n\nThe image compiles and deploys Cgit with Nginx and fcgiwrap.\n\nTo run it:\n\n```bash\ndocker compose up\n```\n\nAnd then open the URL `localhost:8082`. If you want to customize the compilation, installation or configuration, edit the corresponding files.\n\n## Cgit configuration\n\n* You can check and edit the Cgit configuration of the image in the [`cgitrc`](https://github.com/LuqueDaniel/cgit-docker/blob/main/cgitrc) file.\n* The Nginx configuration is in the [`cgit_nginx.conf`](https://github.com/LuqueDaniel/cgit-docker/blob/main/) file.\n* [`cgit_build.conf`](https://github.com/LuqueDaniel/cgit-docker/blob/main/cgit_build.conf) contains environment variables for Cgit compilation. You need to edit it if you want to use different paths.\n\nIf you want to use your own settings you can mount your `cgitrc` file as follows.\n\n```yml\nservices:\n  cgit:\n    hostname: cgit\n    image: cgit:latest\n    build: .\n    ports:\n      - \"8080:80\"\n    restart: on-failure:5\n    volumes:\n        - type: bind\n          source: ./path/to/cgitrc\n          target: /opt/cgit/cgitrc\n```\n\nThe Cgit `scan-path` configuration parameter is set to read repositories from the `/opt/git` path. That path can be mounted as a volume.\n\n```yml\n    volumes:\n      - git-vlume:/opt/git/\n```\n\n## How To add Basic Auth and allow push\nThis example show how to add basic auth (and allow push changes) to you cgit server.\n\n```sh\n# up example [docker-compose.auth-example.yml] configuration\ndocker compose -f docker-compose.auth-example.yml down -v \u0026\u0026 docker compose -f docker-compose.auth-example.yml up --build\n\n# clone repo as root\ndocker compose -f docker-compose.auth-example.yml exec cgit git clone --bare https://github.com/nginx/nginx.git /opt/git/nginx.git\n\n# setup permission to allow write by fcgiwrap process\ndocker compose -f docker-compose.auth-example.yml exec cgit chown -R nginx:nginx /opt/git/nginx.git\n\n# clone repo (use: dev / 123), make some changes and push back\ngit clone http://localhost:8082/nginx /tmp/nginx-cloned\necho \"CHANGED\" \u003e\u003e /tmp/nginx-cloned/README.md\n(cd /tmp/nginx-cloned \u0026\u0026 git add . \u0026\u0026 git commit -m 'changed' \u0026\u0026 git push)\n```\n\n## References\n* [Cgit README](https://git.zx2c4.com/cgit/tree/README)\n* [Cgit configuration](https://git.zx2c4.com/cgit/tree/cgitrc.5.txt)\n* [cgit - ArchWiki](https://wiki.archlinux.org/title/Cgit)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluquedaniel%2Fcgit-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluquedaniel%2Fcgit-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluquedaniel%2Fcgit-docker/lists"}