docs.brut.systems/README.md
2026-01-28 15:44:46 -07:00

34 lines
886 B
Markdown

# 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
```