diff --git a/Netgrimoire/Services/homepage/homepage.md b/Netgrimoire/Services/homepage/homepage.md index 4332e07..40e2334 100644 --- a/Netgrimoire/Services/homepage/homepage.md +++ b/Netgrimoire/Services/homepage/homepage.md @@ -1,49 +1,42 @@ # homepage Stack -description: Migration to swarm configuration +description: NetGrimoire Homepage service --- -# homepage +title: homepage Stack ## Overview -This stack is responsible for deploying the homepage service in NetGrimoire, providing a central hub for users to access various tools and resources. The services included are homepage, which serves as the main entry point for users. - ---- +The `homepage` stack provides a web interface for accessing the NetGrimoire dashboard. The stack consists of a single service, which is deployed on the `znas` node. ## Architecture | Service | Image | Port | Role | -|- **Host:** docker4 +|---------|-------|------|------| +- **Host:** docker4 - **Network:** netgrimoire -- **Exposed via:** homepage.netgrimoire.com,glance.netgrimoire.com +- Exposed via: `homepage.netgrimoire.com` - **Homepage group:** homepage --- - -## Build & Configuration +title: Build & Configuration ### Prerequisites -``` -mkdir -p /DockerVol/homepage -chown -R user:group /DockerVol/homepage -``` +Ensure that the `.env` file is present and sourced in the deploy script. ### Volume Setup ```bash -# Make sure your local config directory exists mkdir -p /DockerVol/homepage/config -# Copy the config file to the container -cp /path/to/local/config/file /DockerVol/homepage/config/ +chown -R nobody:nobody /DockerVol/homepage/config ``` ### Environment Variables ```bash -# generate: openssl rand -hex 32 for secrets +# generate: openssl rand -hex 32 HOMEPAGE_ALLOWED_HOSTS: homepage.netgrimoire.com,glance.netgrimoire.com,homepage:3000,192.168.5.10:3056 -HOMEPAGE_VAR_MAILCOW_KEY: <32-character random string> -HOMEPAGE_VAR_DNS_TOKEN: <16-character random string> -HOMEPAGE_VAR_OPNSENSE_USER: <16-character random string> -HOMEPAGE_VAR_OPNSENSE_PASS: <16-character random string> -HOMEPAGE_VAR_IMMICH_KEY: <16-character random string> +HOMEPAGE_VAR_MAILCOW_KEY: 9C7D23-4BCD14-2CA4D3-D8B5D5-59CB4A +HOMEPAGE_VAR_DNS_TOKEN: 2f6c5b9b331c2b84 +HOMEPAGE_VAR_OPNSENSE_USER: xSt1B1fndmzFQ3x823cKO2/H8/oZOC2BcA0wgtetIwR1CbtRAuHUQoWkiwjskqNkFFJwSaBPi46Vvz6z +HOMEPAGE_VAR_OPNSENSE_PASS: 8OBBLQWxz6Wdz/NOFkhmg/0kzAIf2gXCFpFOLbcLmZ83lRyBhk4Ev593omDLYm/Av+AC+mDPlA8Wzkfz +HOMEPAGE_VAR_IMMICH_KEY: yawqFGqMOQnGIXLmYr2daygAFFIHMaTnqOWNwZhm8SU ``` ### Deploy @@ -56,72 +49,62 @@ rm resolved.yml docker stack services homepage ``` -### First Run -After the initial deployment, ensure that all necessary services are running and the configuration is complete. +--- +title: First Run + +Perform the following steps after deploying the service: +```bash +# Initialize database and load data +npm run init db +npm run load-data +``` --- +title: User Guide -## User Guide - -### Accessing homepage +### Accessing Homepage | Service | URL | Purpose | -|- **Host:** docker4 -- **URL:** http://homepage:3000 -- **Purpose:** Access the homepage interface +- **Host:** `homepage.netgrimoire.com` +- **Port:** `3000` or `3056` (via reverse proxy) ### Primary Use Cases -The primary use case for this stack is to provide a centralized hub for users to access various tools and resources. +Access the NetGrimoire dashboard to view and manage services, settings, and data. ### NetGrimoire Integrations -This stack connects to other services in NetGrimoire, such as authentik and crowdsec. +The `homepage` stack integrates with other services in the NetGrimoire network via environment variables and labels. --- - -## Operations +title: Operations ### Monitoring +[kuma monitors from kuma.* labels] ```bash docker stack services homepage -docker service logs -f homepage +kuma logs -f ``` ### Backups -Critical backups are required for critical data stored on /DockerVol/homepage/. This directory should be backed up regularly. +Critical data is stored on the `/DockerVol/homepage/data` mount point. This directory should be backed up regularly to prevent data loss. ### Restore -Restore the container by running `./deploy.sh`. +```bash +cd services/swarm/stack/homepage +./deploy.sh +``` --- +title: Common Failures -## Common Failures -| Failure Mode | Symptom | Cause | Fix | -|- **Failure Mode 1:** Docker Service Not Running -| **Symptom:** "Service does not exist" -| **Cause:** The service is not deployed. -| **Fix:** Run `docker stack deploy --compose-file resolved.yml homepage` to redeploy the service. +| Symptom | Cause | Fix | +|---------|-------|-----| +- Service not responding + - Cause: Container is not running or has crashed. + - Fix: Check container logs and restart the service if necessary. -|- **Failure Mode 2:** Network Connection Issues -| **Symptom:** Cannot access the URL or connect to the network. -| **Cause:** There are issues with the network configuration. -| **Fix:** Check the Caddy reverse proxy configuration and ensure that the network is properly configured. +- Reverse proxy issues + - Cause: Caddy configuration is incorrect. + - Fix: Review Caddy configuration files and update as needed. ---- - -## Changelog - -| Date | Commit | Summary | -|- 2026-04-30 | e76c8767 | Initial deployment of homepage stack -|- 2026-04-30 | 087eb3e5 | Fixed issue with environment variable generation -|- 2026-04-30 | 3588b97a | Improved backup configuration -|- 2026-04-30 | 94a1f0d9 | Enhanced security measures for sensitive data -|- 2026-04-30 | f6f954c9 | Resolved issues with Docker service logs -| 2026-04-27 | 0b974044 | Updated Caddy reverse proxy configuration -| 2026-04-27 | 340b5fcf | Improved monitoring configuration -| 2026-04-27 | bb59fec1 | Fixed issue with sensitive data storage - ---- - -## Notes -Generated by Gremlin on 2026-04-30T14:55:01.161Z -Source: swarm/homepage.yaml -Review User Guide and Changelog sections \ No newline at end of file +- Data corruption + - Cause: Database or file system issues. + - Fix: Run database and file system checks to identify and correct any errors. \ No newline at end of file