Giter Site home page Giter Site logo

edsonbittencourt / alpine-cgit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joseluisq/alpine-cgit

0.0 0.0 0.0 77 KB

Multi-Arch Docker images for the hyperfast web frontend for Git repositories on top of Alpine and Nginx.

License: Apache License 2.0

Shell 24.72% Makefile 6.61% Dockerfile 68.66%

alpine-cgit's Introduction

Alpine CGit devel Docker Image Version (tag latest semver) Docker Image Size (tag) Docker Image

The hyperfast web frontend for Git repositories on top of Alpine and Nginx.

CGit is a web interface (cgi) for Git repositories, written in C.

CGit features

  • Basic repository browsing (logs, diffs, trees...).
  • Caching of generated HTML.
  • Cloneable URLs (implements dumb HTTP transport).
  • Commit feeds (atom format).
  • Discovery of Git repositories.
  • On-the-fly archives for tags and commits.
  • Plugin support e.g. syntax highlighting.
  • Side-by-side diffs.
  • Simple time/author statistics.
  • Simple virtual hosting support (macro expansion).
  • Understands GitWeb project-lists.
  • Understands gitweb.owner in Git config files.
  • Has an extensive filtering framework using scripts or a built-in Lua interpreter.

See CGit project for more details.

Usage

docker run --rm -it \
    -p 8787:80 \
    -v /my/repos/:/srv/git/ \
        joseluisq/alpine-cgit:2

Dockerfile

FROM joseluisq/alpine-cgit:2

Key container paths

  • /etc/cgitrc: Default CGit configuration file.
  • /srv/git: Default directory for Git repositories scanned by CGit.
  • /var/cache/cgit: Default CGit caching directory of generated HTML.

Note that all these paths can be overwritten via Bind Mounts or Docker Volumes.

Settings via environment variables

CGit Docker image can be configured via environment variables. This is the default behavior.

  • CGIT_TITLE: Website title.
  • CGIT_DESC: Website description.
  • CGIT_VROOT: Virtual root directory.
  • CGIT_SECTION_FROM_STARTPATH: How many path elements from each repo path to use as a default section name.
  • CGIT_MAX_REPO_COUNT: Number of entries to list per page on the repository index page.

Settings via custom configuration file

By default, this Docker image will use a template file located at cgit/cgit.conf which is replaced with the env settings (mentioned above) at start-up time.

However, if you want to use a custom /etc/cgitrc file then follow these steps:

  1. Provide the env variable USE_CUSTOM_CONFIG=true to prevent using the default config file.
  2. Provide the custom config file as a Bind Mount or Docker Volume. For example --volume my-config-file:/etc/cgitrc
  3. Provide the cache-root option in your config file. For example cache-root=/var/cache/cgit
  4. Provide the scan-path option in your config file. For example scan-path=/srv/git
  5. Provide the repositories folder as a Bind Mount or Docker Volume. For example --volume my-repos:/srv/git

See cgitrc man page for more detailed information.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.

Feel free to send some Pull request or file an issue.

License

This work is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

© 2021-present Jose Quintana

alpine-cgit's People

Contributors

joseluisq avatar snyk-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.