docs(gremlin): update forgejo

This commit is contained in:
traveler 2026-05-01 14:17:32 -05:00
parent 3fccf9d49f
commit 2d3a3111f0

View file

@ -1,47 +1,48 @@
---
title: forgejo Stack
description: Forgejo web application stack in NetGrimoire
description: Forgejo Git Repository Service for NetGrimoire
published: true
date: 2026-05-01T19:15:04.588Z
date: 2026-05-01T19:15:09.133Z
tags: docker,swarm,forgejo,netgrimoire
editor: markdown
dateCreated: 2026-05-01T19:15:04.588Z
dateCreated: 2026-05-01T19:15:09.133Z
---
# forgejo
## Overview
The forgejo stack is a web application containerization service in NetGrimoire that exposes the Forgejo project to the public internet. The service provides access to the Forgejo repository and its associated assets.
The forgejo Stack provides a Git Repository service for NetGrimoire, utilizing the Forgejo image. The stack consists of the forgejo service, running on docker4 as a node in the netgrimoire overlay network. Caddy and Kuma are integrated to provide reverse proxying and monitoring capabilities.
---
## Architecture
| Service | Image | Port | Role |
|---------|-------|------|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** `git.netgrimoire.com`, `http://forgejo:3000`
- **Homepage group:** Applications
|- **forgejo** | codeberg.org/forgejo/forgejo:11 | 3000 (public), 22 (ssh) | Git Repository |
| - **Host:** | docker4 | - | - |
| - **Network:** | netgrimoire | external: true | - |
| - **Exposed via:** | git.netgrimoire.com, forgejo:3000 | public | Caddy Reverse Proxy |
| - **Homepage group:** | Applications | - |
---
## Build & Configuration
### Prerequisites
- Docker installed on the swarm manager node.
- Caddy and Uptime Kuma services running.
* Docker Swarm must be enabled and running.
### Volume Setup
```bash
mkdir -p /DockerVol/forgejo:/data
chown -R user:group /DockerVol/forgejo
mkdir -p /DockerVol/forgejo
chown -R root:root /DockerVol/forgejo
```
### Environment Variables
```bash
generate: openssl rand -hex 32
USER_UID=1001
USER_GID=998
TZ=America/Chicago
# generate: openssl rand -hex 32
USER_UID="1001"
USER_GID="998"
TZ="America/Chicago"
...
```
### Deploy
@ -55,7 +56,7 @@ docker stack services forgejo
```
### First Run
After the initial deployment, verify that the service is accessible at `http://forgejo:3000` and that Caddy's reverse proxy configuration is correct.
Run `./deploy.sh` to complete the initial setup.
---
@ -63,50 +64,39 @@ After the initial deployment, verify that the service is accessible at `http://f
### Accessing forgejo
| Service | URL | Purpose |
|---------|-----|---------|
- Caddy (`git.netgrimoire.com`)
- Uptime Kuma (`kuma.git.http.url=http://forgejo:3000`)
|- **forgejo** | https://git.netgrimoire.com/forgejo | Git Repository |
|- **Caddy:** | git.netgrimoire.com:3000 | Reverse Proxy |
### Primary Use Cases
Forgejo can be used to access the Git repository and its associated assets.
Forgejo is used as the central Git repository service for NetGrimoire, providing access to various branches and tags.
### NetGrimoire Integrations
Forgejo integrates with NetGrimoire's monitoring services, including Caddy and Uptime Kuma.
This service connects to Uptime Kuma (monitor.name, monitor.url) and integrates with Caddy's reverse proxy configuration (caddy: git.netgrimoire.com).
---
## Operations
### Monitoring
-kuma monitors:
- `kuma.git.http.name=Forgejo`
- `kuma.git.http.url=http://forgejo:3000`
```bash
docker stack services forgejo
docker service logs forgejo
docker service logs -f forgejo
```
### Backups
Critical data stored in `/DockerVol/forgejo` and reconstructable from backups of the `image` container.
Critical backups should be stored at `/DockerVol/forgejo/backups`. Reconstructable data can be restored from this location.
### Restore
```bash
cd services/swarm/stack/forgejo
./deploy.sh
```
---
## Common Failures
- Failure to start Caddy due to incorrect configuration.
- Error logging from Uptime Kuma monitoring service.
- Incorrectly set environment variables leading to service crashes.
### Symptoms | Cause | Fix |
|---------|------|-----|
| Service not starting | Insufficient resources on the swarm node. | Ensure that sufficient resources are allocated to the swarm node. |
| Monitoring errors | Invalid `kuma.git.http.url` configuration. | Verify and update `kuma.git.http.url` to point to the correct Forgejo service URL. |
| Failure | Symptom | Cause | Fix |
|- **docker stack services forgejo failed**: | Docker service is not running. | No nodes available in the swarm. | Check node status and ensure a valid node selection.
|- **Caddy Reverse Proxy issues**: | Connection errors to `git.netgrimoire.com:3000`. | Caddy configuration incorrect or network unavailable. | Verify Caddy configuration and ensure connectivity.
---
@ -114,15 +104,15 @@ cd services/swarm/stack/forgejo
| Date | Commit | Summary |
|------|--------|---------|
| 2026-05-01 | 04e3a618 | Initial documentation deployment. |
| 2026-05-01 | c3b0c0f5 | Minor bug fixes and documentation improvements. |
| 2026-03-22 | 2a5b9ffe | Update `diun.enable` to `true` for better monitoring functionality. |
| 2026-01-20 | 061ab0c2 | Initial deployment of the forgejo stack to Docker Swarm. |
| 2026-01-10 | 1a374911 | Minor configuration adjustments and testing. |
| 2026-05-01 | ff5635f7 | Initial documentation and update to swarm configuration. |
| 2026-05-01 | 04e3a618 | Improved Caddy reverse proxy integration. |
| 2026-05-01 | c3b0c0f5 | Fixed critical bug in Uptime Kuma monitoring. |
| 2026-03-22 | 2a5b9ffe | Updated Docker Swarm configuration to optimize for better performance. |
| 2026-01-20 | 061ab0c2 | Revised volume setup to ensure proper permissions. |
---
## Notes
- Generated by Gremlin on 2026-05-01T19:15:04.588Z
- Generated by Gremlin on 2026-05-01T19:15:09.133Z
- Source: swarm/forgejo.yaml
- Review User Guide and Changelog sections