update docs

This commit is contained in:
Judah Caruso 2026-01-28 16:51:07 -07:00
parent 230dc9f69f
commit 59b2951a36
2 changed files with 13 additions and 3 deletions

View file

@ -50,7 +50,7 @@
</style>
</head>
<body>
<h1>Docs.Brut.Systems</h1><p>This program acts as a proxy to serve files directly from repositories.</p><p>It expects the following environment variables to be set:</p><ul><li><code>API_URL</code> - Base Forgejo API url (ex. <code>https://git.brut.systems</code>)</li><li><code>API_TOKEN</code> - Forgejo API authorization token</li><li><code>REDIRECT_URL</code> - Redirect url when access fails or files do not exist (ex. <code>https://git.brut.systems</code>)</li><li><code>PORT</code> - Port to listen on</li></ul><h2>Usage W/ Systemd</h2><p>Create a file at <code>/etc/systemd/system/docs.brut.service</code> with the following:</p><pre><code>[Unit]
<h1>Docs.Brut.Systems</h1><p>This program acts as a proxy to serve files directly from repositories.</p><p>It expects the following environment variables to be set:</p><ul><li><code>API_URL</code> - Base Forgejo API url (ex. <code>https://git.brut.systems</code>)</li><li><code>API_TOKEN</code> - Forgejo API authorization token</li><li><code>REDIRECT_URL</code> - Redirect url when access fails or files do not exist (ex. <code>https://git.brut.systems</code>)</li><li><code>PORT</code> - Port to listen on</li></ul><h2>How It Works</h2><p>When a request like <code>http://localhost:8080/user/repository/path/to/file</code> is sent to the proxy, it will dynamically fetch that file from the repository and return it to the user.</p><h2>Usage With Systemd</h2><p>Create a file at <code>/etc/systemd/system/docs.brut.service</code> with the following:</p><pre><code>[Unit]
Description=Serves files from Git repositories
After=network.target
</code></pre><pre><code>[Service]
@ -68,6 +68,6 @@ Environment="PORT=&lt;port&gt;"
WantedBy=multi-user.target
</code></pre><p>Then start the service:</p><pre><code>sudo systemctl enable docs.brut
sudo systemctl start docs.brut
</code></pre>
</code></pre><h2>Usage Within Git.Brut.Systems</h2><p>Those with repositories on <a href="https://git.brut.systems">git.brut.systems</a> can serve websites by creating a <code>docs/</code> folder (on the default branch). While any file from the repository can be accessed, files within <code>docs/</code> are accessible from <code>/</code>. If a file within <code>docs/</code> conflicts with another file in the repository, the file in <code>docs/</code> take precedence.</p>
</body>
</html>

View file

@ -10,7 +10,12 @@ It expects the following environment variables to be set:
- `PORT` - Port to listen on
USAGE W/ SYSTEMD
HOW IT WORKS
When a request like `http://localhost:8080/user/repository/path/to/file` is sent to the proxy, it will dynamically fetch that file from the repository and return it to the user.
USAGE WITH SYSTEMD
Create a file at `/etc/systemd/system/docs.brut.service` with the following:
@ -37,3 +42,8 @@ Then start the service:
sudo systemctl enable docs.brut
sudo systemctl start docs.brut
USAGE WITHIN GIT.BRUT.SYSTEMS
Those with repositories on [https://git.brut.systems git.brut.systems] can serve websites by creating a `docs/` folder (on the default branch). While any file from the repository can be accessed, files within `docs/` are accessible from `/`. If a file within `docs/` conflicts with another file in the repository, the file in `docs/` take precedence.