Proxy to serve files from repositories
Find a file
2026-01-28 15:45:44 -07:00
docs.brut.systems should be a linux binary instead 2026-01-28 15:45:44 -07:00
go.mod init 2026-01-28 15:30:27 -07:00
go.sum init 2026-01-28 15:30:27 -07:00
main.go init 2026-01-28 15:30:27 -07:00
README.md init + binary 2026-01-28 15:44:46 -07:00
start.sh init + binary 2026-01-28 15:44:46 -07:00

docs.brut.systems

This program acts as a proxy to serve files directly from repositories.

It expects the following environment variables to be set:

  • API_URL - Base Forgejo API url (ex. https://git.brut.systems)
  • API_TOKEN - Forgejo API authorization token
  • REDIRECT_URL - Redirect url when access fails or files do not exist (ex. https://git.brut.systems)
  • PORT - Port to listen on

Usage w/ systemd

Create a file at /etc/systemd/system/docs.brut.service with the following:

[Unit]
Description=Serves files from Git repositories
After=network.target

[Service]
Type=simple
ExecStart=<path/to/respository>/start.sh
ExecStop=/usr/bin/pkill docs.brut.systems
Restart=always
User=<user to run as>
Environment="API_URL=<url>"
Environment="API_TOKEN=<token>"
Environment="REDIRECT_URL=<url>"
Environment="PORT=<port>"

[Install]
WantedBy=multi-user.target