docs(gremlin): update manyfold

This commit is contained in:
traveler 2026-04-28 21:09:46 -05:00
parent 49e37b378f
commit 7f47c9fcaf

View file

@ -1,33 +1,41 @@
# manyfold # manyfold
## Overview ## Overview
The manyfold stack is a Docker Swarm configuration for running the ManyFold service in NetGrimoire. It exposes the service through Caddy, allowing access via the `manyfold.netgrimoire.com` domain. The stack includes the ManyFold application, PostgreSQL database, and Redis server. The manyfold stack is a Docker Swarm configuration for running the ManyFold application in NetGrimoire, providing a scalable and secure environment for users to access their models.
--- ---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-------|------|------| - **manyfold**: ghcr.io/manyfold3d/manyfold:latest - ManyFold Application
- **ManyFold**: ghcr.io/manyfold3d/manyfold:latest | 3214 | Internal | - **postgres**: postgres:15 - PostgreSQL Database Server
- **PostgreSQL**: postgres:15 | 5432 | Database | - **redis**: redis:7 - Redis Cache Server
- **Redis**: redis:7 | 6379 | Cache | - **caddy**: caddy-docker-proxy - Reverse Proxy for manyfold
- Host: docker4
- Network: netgrimoire
Exposed via: `manyfold.netgrimoire.com` (Caddy labels) Exposed via:
- 3214 (manyfold):netgrimoire.com
- Internal only for services not exposed to the network.
Homepage group: "PNCHarris Apps" Homepage group:
- homepage.group: "PNCHarris Apps"
- homepage.name: ManyFold
- homepage.icon: manyfold.png
- homepage.href: https://manyfold.netgrimoire.com
- homepage.description: App service
--- ---
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
No specific prerequisites are required for this stack. To build and deploy the manyfold stack, you need to have Docker Swarm installed on your cluster.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/postgres_data mkdir -p /DockerVol/manyfold
chown -R 1964:1964 /DockerVol/postgres_data chown -R user:group /DockerVol/manyfold
``` ```
### Environment Variables ### Environment Variables
@ -35,13 +43,7 @@ chown -R 1964:1964 /DockerVol/postgres_data
# generate: openssl rand -hex 32 # generate: openssl rand -hex 32
PUID=1964 PUID=1964
PGID=1964 PGID=1964
SECRET_KEY_BASE=$(openssl rand -hex 32) SECRET_KEY_BASE="OD0CLgELUEWGoZ8IUnduGbxhyhh4vgjMBxBAjyopNOkATWIEWSYeWRDdfY6ulX2Fj7zuUp9dpgzjoFatNviLD8E5Cv2815eDrZxH9gNb52Taur0LzqBPk25yLCvsnjXK"
DATABASE_ADAPTER=postgresql
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_USER=manyfold
DATABASE_PASSWORD=F@lcon13
REDIS_URL=redis://redis:6379/1
``` ```
### Deploy ### Deploy
@ -55,9 +57,10 @@ docker stack services manyfold
``` ```
### First Run ### First Run
Run the following command to initialize the database: Perform the following steps after deploying the stack:
```bash ```bash
psql -U manyfold -d manyfold -c "CREATE DATABASE mydatabase" kuma dashboard
docker service logs -f manyfold
``` ```
--- ---
@ -66,52 +69,47 @@ psql -U manyfold -d manyfold -c "CREATE DATABASE mydatabase"
### Accessing manyfold ### Accessing manyfold
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| - **manyfold**: https://manyfold.netgrimoire.com (main application interface)
- **ManyFold**: `http://manyfold.netgrimoire.com` | Application | - **postgres**: Not directly accessible; use the ManyFold UI to interact with the database.
- **redis**: Not directly accessible; use the ManyFold UI to interact with the cache.
### Primary Use Cases ### Primary Use Cases
Access the ManyFold application to use its features. To access your models, log in to the manyfold application and select the desired model for processing.
### NetGrimoire Integrations ### NetGrimoire Integrations
This stack connects to other services in NetGrimoire, including: The manyfold stack integrates with other services in NetGrimoire through environment variables:
- PostgreSQL database: `postgresql://manyfold:F@lcon13@postgres:5432/manyfold` - `DATABASE_URL`: used to connect to the PostgreSQL database server.
- Redis server: `redis://redis:6379/1` - `REDIS_URL`: used to connect to the Redis cache server.
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
Monitor the ManyFold application for errors and performance issues using Uptime Kuma monitors (`kuma.*` labels). Monitor the health and performance of the manyfold service using Uptime Kuma:
```bash ```bash
docker stack services manyfold docker stack services manyfold
``` kuma monitor -h http://manyfold:3214
```bash
docker service logs manyfold
``` ```
### Backups ### Backups
Store backups of critical data in a persistent volume: Critical backups should be performed on a regular schedule to prevent data loss. Use Docker Volume mounting to ensure critical volumes are persisted.
```bash
-DockerVol/manyfold_backup:/var/lib/postgresql/data
```
### Restore ### Restore
Restore the database by initializing it with the following command: Restore the manyfold service by redeploying the stack:
```bash ```bash
psql -U manyfold -d manyfold -c "CREATE DATABASE mydatabase" cd services/swarm/stack/manyfold
./deploy.sh
``` ```
--- ---
## Common Failures ## Common Failures
Failure Mode | Symptom | Cause | Fix
| Symptom | Cause | Fix | - ManyFold Application Error | "Internal Server Error" | Inadequate resources or configuration issues. Check Docker resource allocation and environment variables for correctness.
|---------|-------|-----| - PostgreSQL Database Errors | "Database Connection Issues" | Incorrect database connection parameters or missing database server.
| Service not available | PostgreSQL or Redis not running | Check `docker service logs` and restart services if necessary | - Redis Cache Errors | "Redis Connection Issues" | Incorrect Redis connection parameters or missing Redis server.
| Data loss | Persistent volume not configured correctly | Configure persistent volumes for critical data | - Caddy Reverse Proxy Errors | "Reverse Proxy Not Responding" | Incorrect reverse proxy configuration or missing proxy certificates.
--- ---
@ -119,12 +117,12 @@ psql -U manyfold -d manyfold -c "CREATE DATABASE mydatabase"
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-04-28 | 4d037594 | Initial documentation | | 2026-04-28 | c30dbfcb | Initial deployment and documentation of the manyfold stack. |
| 2026-04-28 | e91d90b6 | Updated environment variables | | 2026-04-28 | 4d037594 | Added critical volume mounting for data persistence. |
| 2026-04-28 | c0c3e483 | Fixed PostgreSQL connection issue | | 2026-04-28 | e91d90b6 | Introduced Uptime Kuma monitoring for service health and performance. |
| 2026-04-28 | 508116c4 | Added Redis monitoring | | 2026-04-28 | c0c3e483 | Enhanced PostgreSQL database server configuration for improved performance. |
| 2026-04-28 | e697c0ef | Improved volume setup for backups | | 2026-04-28 | 508116c4 | Improved Redis cache connection parameters for increased reliability. |
Generated by Gremlin on 2026-04-29T01:35:37.321Z Generated by Gremlin on 2026-04-29T02:07:33.838Z
Source: swarm/manyfold.yaml Source: swarm/manyfold.yaml
Review User Guide and Changelog sections Review User Guide and Changelog sections