I only noticed one issue, which is very much an edge case: when trying to view a file with third party JS disabled (i.e. the Cloudflare JS sourced script), the file is rendered quite poorly. Would be nice if the service degraded gracefully and used a simple pre tag or similar.
I must also admit that I am interested in a more "non-technical" git frontend -- one that puts the file tree up front and center, leaving details like remotes and commits in out of the way views.
If anyone is interested in other options, see also:
* https://git.nemo157.com/grarr (Rust, the UI themes are a little tacky IMHO)
* https://github.com/emersion/matcha (also in Go, but not very complete or performant...)
You could check the landing page of this project here:
I've put up a FAQ and Features section with screenshots, so it is easy for you to look at it and see why I've built this software.
It aims to provide a limited subset of the features they provide. More similar to cgit.
The use case is to let website owners see what their developers are changing in the source code that I'm hosting for those owners, and to embed this in the existing dashboard of mine where the owners can see what's happening on their servers. I would handle myself the part where the source code modifications are committed to the underlining git repositories, and a nice bonus would be that those repositories would act an additional backup strategy.
Unfortunately nothing came close to this simple wishlist, I was unable to get the likes of git-web or gitiles working under those constraints, I tried 4 or 5 at least.
I should have a look at Sorcia then!
Front-ends like these are really cool. They allow simple, self hosted solutions strictly for code that can then be mirrored to other, more complex solutions if desired. Or if you like working with very minimal tooling.
Maybe I can tweak the design later to show the DP a little bit larger for the next rolling release.
- Can you make it a drop-and-play Docker image?
- Sure, I was thinking about that. Being this a self-hosted software, I should have used those vendor js libraries directly. But it was hyper fast when I used Cloudflare CDN that blinded my eyes. Anyways, I'll release a patch version today using the js libraries directly.
I cloned your project and made a Dockerfile for it. It works on my Arm32 based board so I guess it should work on other platforms as well.
The file is here, should be a good starting point if you want to further develop the Docker image, please test it:
# This is an experimental Dockerfile for Sorcia Git front-end
# This image allows both easy deployment and use. The deployer
# can operate the resulting container via Docker remote management
# with command such as:
# `docker -H <docker_server> exec sorcia /home/git/sorcia/sorcia usermod`
# to manage the service rather than having to login onto the Docker
# To build the image, use command
# `docker build --tag <final_image_name> .`
# Or, setup a hook on Docker cloud, let it do the hard job for you.
# To run the image, use command:
# `docker run \
# --detach \
# --restart always \
# --name sorcia \
# --publish 1937:1937 \ # You may have to change this port number
# --publish 2222:2222 \ # iptables maybe needed if you want port 22
# <final_image_name> web`
# To run usermod, when the container is running, run:
# `docker exec -it <container_name> /home/git/sorcia/sorcia usermod`
# Notice: This image does not contain Nginx, if you need it, put it in
# a separate container.
# Step 1: Initialize the build enviroment and build the application
# Here we are using the golang:alpine which is the latest Go but
# is compiled for Alpine. This is necessary because we will later
# run the service on an Alpine base (musl based).
# Step 1.0: Copy all source file into the container
# Step 1.1: Install Git to download go modules, and build-base to
# build the dependencies
# Step 1.2: Print the version of the bulitin Go
# Step 1.3: Goto /sorcia directory and start the building process
FROM golang:alpine as builder
COPY . /sorcia
RUN set -ex && \
until apk add build-base git sqlite-dev; do sleep 1; done && \
([ -z "$HTTP_PROXY" ] || (git config --global http.proxy "$HTTP_PROXY")) && \
([ -z "$HTTPS_PROXY" ] || (git config --global https.proxy "$HTTPS_PROXY")) && \
go version && \
cd /sorcia && \
until CGO_ENABLED=1 go build; do sleep 1; done
# Step 2: Setup the image that will actually run the service
# Step 2.0: Copy the generated binary along with source file into
# the container
# Step 2.1: Install the dependencies: Git and Sqlite
# Step 2.2: Create user and user group git and sorcia, we'll run the
# service application under user sorcia
# Step 2.3: Initialize the enviroment (Directory and other stuff)
COPY --from=builder /sorcia /home/git/sorcia
RUN set -ex && \
ls -l /home/git/sorcia && \
cp /home/git/sorcia/config/app.ini.sample /home/git/sorcia/config/app.ini && \
sed -i -E "s/ssh_port.+\=.+/ssh_port = 2222/" /home/git/sorcia/config/app.ini && \
echo && cat /home/git/sorcia/config/app.ini && echo && \
until apk add --no-cache openssh git sqlite; do sleep 1; done && \
addgroup -S sorcia && adduser -S -G sorcia sorcia && \
mkdir -p /home/git/data && chown sorcia:sorcia /home/git/data && \
chmod +x /home/git/sorcia/sorcia && \
(cd /home/git/sorcia; rm error.log -f; ln -s /tmp/error.log error.log; ./sorcia version)
EXPOSE 1937 2222
ENTRYPOINT [ "/home/git/sorcia/sorcia" ]
I think what GP was referring to was this: https://sorcia.mysticmode.org/