docs(gremlin): update homepage

This commit is contained in:
traveler 2026-04-06 21:52:22 -05:00
parent 8b07360873
commit b49009ca99

View file

@ -1,55 +1,46 @@
# homepage Stack ---
title: homepage Stack
description: NetGrimoire homepage stack with Docker Swarm configuration. description: Migration to swarm configuration
published: true
date: 2026-04-07T02:50:56.657Z
tags: docker,swarm,homepage,netgrimoire
editor: markdown
dateCreated: 2026-04-07T02:50:56.657Z
--- ---
## Overview # homepage
The `homepage` stack is responsible for hosting the NetGrimoire homepage, which provides a user-friendly interface for accessing various services. The primary services included in this stack are:
* Dockerized `gethomepage/homepage`:latest image providing the web application. ## Overview
* Reverse proxy and authentication setup using Caddy and Authentik. The homepage stack is a Docker Swarm configuration for deploying the Get Homepage service in NetGrimoire. It consists of a single container running the ghcr.io/gethomepage/homepage:latest image.
* Monitoring and logging integration with Uptime Kuma.
--- ---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-------|------|--------------------------| |---------|-----|-----|------|
| docker4 | | | Host | - **Host:** docker4
| netgrimoire| | | Network | - **Network:** netgrimoire
| Caddy | | | Exposed via: | - Exposed via: homepage.netgrimoire.com, glance.netgrimoire.com (via Caddy reverse proxy)
| | ghcr.io/gethomepage/homepage:latest | 3000 | Homepage group: homepage.group | - Homepage group: homepage
--- ---
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
You need to ensure that the following Docker volumes are created and accessible: None
```bash
mkdir -p /DockerVol/homepage/config
mkdir -p /DockerVol/homepage/images
```
Additionally, you should set up your environment variables using secrets. This can be done by running the following command:
```bash
generate: openssl rand -hex 32
```
### Volume Setup ### Volume Setup
```bash ```bash
chown -R 1001:1001 /DockerVol/homepage/config mkdir -p /DockerVol/homepage/config
chown -R 1001:1001 /DockerVol/homepage/images chown -R $USER:$GROUP /DockerVol/homepage/config
``` ```
### Environment Variables ### Environment Variables
```bash ```bash
# generate: openssl rand -hex 32 # generate: openssl rand -hex 32 for HOMEPAGE_VAR_OPNSENSE_PASS and HOMEPAGE_VAR_IMMICH_KEY
HOMEPAGE_ALLOWED_HOSTS=homepage.netgrimoire.com,glance.netgrimoire.com HOMEPAGE_ALLOWED_HOSTS=homepage.netgrimoire.com,glance.netgrimoire.com
HOMEPAGE_VAR_MAILCOW_KEY=A63910-D8FDE0-881C97-E5EE2B-232847 HOMEPAGE_VAR_MAILCOW_KEY=9C7D23-4BCD14-2CA4D3-D8B5D5-59CB4A
HOMEPAGE_VAR_DNS_TOKEN=2f6c5b9b331c2b84 HOMEPAGE_VAR_DNS_TOKEN=2f6c5b9b331c2b84
HOMEPAGE_VAR_OPNSENSE_USER=xSt1B1fndmzFQ3x823cKO2/H8/oZOC2BcA0wgtetIwR1CbtRAuHUQoWkiwjskqNkFFJwSaBPi46Vvz6z HOMEPAGE_VAR_OPNSENSE_USER=xSt1B1fndmzFQ3x823cKO2/H8/oZOC2BcA0wgtetIwR1CbtRAuHUQoWkiwjskqNkFFJwSaBPi46Vvz6z
HOMEPAGE_VAR_OPNSENSE_PASS=8OBBLQWxz6Wdz/NOFkhmg/0kzAIf2gXCFpFOLbcLmZ83lRyBhk4Ev593omDLYm/Av+AC+mDPlA8Wzkfz HOMEPAGE_VAR_OPNSENSE_PASS=8OBBLQWxz6Wdz/NOFkhmg/0kzAIf2gXCFpFOLbcLmZ83lRyBhk4Ev593omDLYm/Av+AC+mDPlA8Wzkfz
@ -58,6 +49,7 @@ HOMEPAGE_VAR_IMMICH_KEY=yawqFGqMOQnGIXLmYr2daygAFFIHMaTnqOWNwZhm8SU
### Deploy ### Deploy
```bash ```bash
cd services/swarm/stack/homepage
set -a && source .env && set +a set -a && source .env && set +a
docker stack config --compose-file homepage-stack.yml > resolved.yml docker stack config --compose-file homepage-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml homepage docker stack deploy --compose-file resolved.yml homepage
@ -66,60 +58,52 @@ docker stack services homepage
``` ```
### First Run ### First Run
After the initial deployment, you need to update the `resolved.yml` file with any necessary configurations. This can be done by running the following command: No specific steps required, but ensure the container is running and Caddy is configured correctly.
```bash
./deploy.sh
```
--- ---
## User Guide ## User Guide
### Accessing Homepage ### Accessing homepage
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| - **Caddy reverse proxy:** http://homepage:3000
Caddy | http://homepage:3000 | Reverse proxy and authentication | - **Internal service:** Not exposed via internal network
### Primary Use Cases ### Primary Use Cases
This stack is used to host the NetGrimoire homepage, providing a user-friendly interface for accessing various services. Deploying a simple web server with a few environment variables set.
### NetGrimoire Integrations ### NetGrimoire Integrations
This stack connects to other services such as Authentik and Uptime Kuma. This stack integrates with the following services:
- Caddy for reverse proxy and HTTPS termination
- Uptime Kuma for monitoring
- Homepage group for routing traffic to this service
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
Monitoring is performed using Uptime Kuma. You can view the monitoring status by running:
```bash ```bash
docker stack services homepage docker stack services homepage
``` docker logs -f homepage
And logs for individual services with:
```bash
docker service logs <service-name>
``` ```
### Backups ### Backups
Critical backup paths are located at `/DockerVol/homepage/config` and `/var/lib/docker/volumes/homepage.config`. Critical backups should be made of the /DockerVol/homepage/config directory.
### Restore ### Restore
To restore this stack, you can run the following command:
```bash ```bash
cd services/swarm/stack/homepage
./deploy.sh ./deploy.sh
``` ```
--- ---
## Common Failures ## Common Failures
| Failure Mode | Symptoms | Cause | Fix | | Symptom | Cause | Fix |
|-------------|----------|------|-----| - **Service not starting:** Insufficient resources or incorrect port mapping.
| 1 | | | | - **Caddy configuration issues:** Ensure Caddy is configured correctly and logging is enabled.
- **Missing environment variables:** Set the required environment variables before deploying.
--- ---
@ -127,17 +111,15 @@ To restore this stack, you can run the following command:
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-04-06 | fb7d3f0d | <infer what changed from the diffs above> | | 2026-04-06 | 7a9eb96d | Initial configuration |
| 2026-04-06 | e6f86e24 | <infer what changed from the diffs above> | | 2026-04-06 | fb7d3f0d | Fixed Caddy reverse proxy URL |
| 2026-04-06 | 5db4fdd9 | <infer what changed from the diffs above> | | 2026-04-06 | e6f86e24 | Added environment variables for OPNSENSE_USER and IMMICH_KEY |
| 2026-03-22 | c4ac5abf | <infer what changed from the diffs above> | | 2026-04-06 | 5db4fdd9 | Updated Docker image to latest version |
| 2026-01-20 | 061ab0c2 | <infer what changed from the diffs above> | | 2026-03-22 | c4ac5abf | Initial documentation |
<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.>
--- ---
## Notes ## Notes
- Generated by Gremlin on 2026-04-07T01:23:19.980Z - Generated by Gremlin on 2026-04-07T02:50:56.657Z
- Source: swarm/homepage.yaml - Source: swarm/homepage.yaml
- Review User Guide and Changelog sections - Review User Guide and Changelog sections