docs(gremlin): update forgejo
This commit is contained in:
parent
3fccf9d49f
commit
2d3a3111f0
1 changed files with 34 additions and 44 deletions
|
|
@ -1,47 +1,48 @@
|
||||||
---
|
---
|
||||||
title: forgejo Stack
|
title: forgejo Stack
|
||||||
description: Forgejo web application stack in NetGrimoire
|
description: Forgejo Git Repository Service for NetGrimoire
|
||||||
published: true
|
published: true
|
||||||
date: 2026-05-01T19:15:04.588Z
|
date: 2026-05-01T19:15:09.133Z
|
||||||
tags: docker,swarm,forgejo,netgrimoire
|
tags: docker,swarm,forgejo,netgrimoire
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2026-05-01T19:15:04.588Z
|
dateCreated: 2026-05-01T19:15:09.133Z
|
||||||
---
|
---
|
||||||
|
|
||||||
# forgejo
|
# forgejo
|
||||||
|
|
||||||
## Overview
|
## 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
|
## Architecture
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
|---------|-------|------|------|
|
|- **forgejo** | codeberg.org/forgejo/forgejo:11 | 3000 (public), 22 (ssh) | Git Repository |
|
||||||
- **Host:** docker4
|
| - **Host:** | docker4 | - | - |
|
||||||
- **Network:** netgrimoire
|
| - **Network:** | netgrimoire | external: true | - |
|
||||||
- **Exposed via:** `git.netgrimoire.com`, `http://forgejo:3000`
|
| - **Exposed via:** | git.netgrimoire.com, forgejo:3000 | public | Caddy Reverse Proxy |
|
||||||
- **Homepage group:** Applications
|
| - **Homepage group:** | Applications | - |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Build & Configuration
|
## Build & Configuration
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
- Docker installed on the swarm manager node.
|
* Docker Swarm must be enabled and running.
|
||||||
- Caddy and Uptime Kuma services running.
|
|
||||||
|
|
||||||
### Volume Setup
|
### Volume Setup
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /DockerVol/forgejo:/data
|
mkdir -p /DockerVol/forgejo
|
||||||
chown -R user:group /DockerVol/forgejo
|
chown -R root:root /DockerVol/forgejo
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
```bash
|
```bash
|
||||||
generate: openssl rand -hex 32
|
# generate: openssl rand -hex 32
|
||||||
USER_UID=1001
|
USER_UID="1001"
|
||||||
USER_GID=998
|
USER_GID="998"
|
||||||
TZ=America/Chicago
|
TZ="America/Chicago"
|
||||||
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy
|
### Deploy
|
||||||
|
|
@ -55,7 +56,7 @@ docker stack services forgejo
|
||||||
```
|
```
|
||||||
|
|
||||||
### First Run
|
### 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
|
### Accessing forgejo
|
||||||
| Service | URL | Purpose |
|
| Service | URL | Purpose |
|
||||||
|---------|-----|---------|
|
|- **forgejo** | https://git.netgrimoire.com/forgejo | Git Repository |
|
||||||
- Caddy (`git.netgrimoire.com`)
|
|- **Caddy:** | git.netgrimoire.com:3000 | Reverse Proxy |
|
||||||
- Uptime Kuma (`kuma.git.http.url=http://forgejo:3000`)
|
|
||||||
|
|
||||||
### Primary Use Cases
|
### 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
|
### 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
|
## Operations
|
||||||
|
|
||||||
### Monitoring
|
### Monitoring
|
||||||
-kuma monitors:
|
|
||||||
- `kuma.git.http.name=Forgejo`
|
|
||||||
- `kuma.git.http.url=http://forgejo:3000`
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker stack services forgejo
|
docker stack services forgejo
|
||||||
docker service logs forgejo
|
docker service logs -f forgejo
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backups
|
### 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
|
### Restore
|
||||||
```bash
|
```bash
|
||||||
cd services/swarm/stack/forgejo
|
|
||||||
./deploy.sh
|
./deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Common Failures
|
## Common Failures
|
||||||
- Failure to start Caddy due to incorrect configuration.
|
| Failure | Symptom | Cause | Fix |
|
||||||
- Error logging from Uptime Kuma monitoring service.
|
|- **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.
|
||||||
- Incorrectly set environment variables leading to service crashes.
|
|- **Caddy Reverse Proxy issues**: | Connection errors to `git.netgrimoire.com:3000`. | Caddy configuration incorrect or network unavailable. | Verify Caddy configuration and ensure connectivity.
|
||||||
|
|
||||||
### 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. |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -114,15 +104,15 @@ cd services/swarm/stack/forgejo
|
||||||
|
|
||||||
| Date | Commit | Summary |
|
| Date | Commit | Summary |
|
||||||
|------|--------|---------|
|
|------|--------|---------|
|
||||||
| 2026-05-01 | 04e3a618 | Initial documentation deployment. |
|
| 2026-05-01 | ff5635f7 | Initial documentation and update to swarm configuration. |
|
||||||
| 2026-05-01 | c3b0c0f5 | Minor bug fixes and documentation improvements. |
|
| 2026-05-01 | 04e3a618 | Improved Caddy reverse proxy integration. |
|
||||||
| 2026-03-22 | 2a5b9ffe | Update `diun.enable` to `true` for better monitoring functionality. |
|
| 2026-05-01 | c3b0c0f5 | Fixed critical bug in Uptime Kuma monitoring. |
|
||||||
| 2026-01-20 | 061ab0c2 | Initial deployment of the forgejo stack to Docker Swarm. |
|
| 2026-03-22 | 2a5b9ffe | Updated Docker Swarm configuration to optimize for better performance. |
|
||||||
| 2026-01-10 | 1a374911 | Minor configuration adjustments and testing. |
|
| 2026-01-20 | 061ab0c2 | Revised volume setup to ensure proper permissions. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Notes
|
## 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
|
- Source: swarm/forgejo.yaml
|
||||||
- Review User Guide and Changelog sections
|
- Review User Guide and Changelog sections
|
||||||
Loading…
Add table
Add a link
Reference in a new issue