diff --git a/Dockerfile b/Dockerfile index 197c110..0997a53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,7 @@ RUN chmod +x /usr/bin/rmauth # manage default value ENV GITUSER gituser ENV GITPASSWORD gitpassword +ENV GITHIGHLIGHT 0 # add ihm mdl ENV IHM no-mdl diff --git a/README.md b/README.md index 4bf9dbc..c5e8089 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ load when start image load file in - GITPROJECT - GITUSER (default gituser) - GITPASSWORD (default gitpassword) +- GITHIGHLIGHT (default `0`) - IHM (default "") ## Volume diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 07a910a..8ca0efd 100644 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -30,6 +30,11 @@ if [ "$1" = 'app' ]; then cat /usr/share/gitweb/ihm/headstring.conf >> /etc/gitweb.conf cp /usr/share/gitweb/ihm/gitweb.css /usr/share/gitweb/static/gitweb.css fi + if [ "$GITHIGHLIGHT" = "1" ]; then + echo '' >> /etc/gitweb.conf + echo '# enable syntax highlighting' >> /etc/gitweb.conf + echo "\$feature{'highlight'}{'default'} = [1];" >> /etc/gitweb.conf + fi service fcgiwrap start nginx -g "daemon off;" /bin/run-parts --verbose --regex '\.(sh)$' "/usr/share/gitweb/docker-entrypoint.post"