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
## 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
| Service | Image | Port | Role |
|---------|-------|------|------|
- **ManyFold**: ghcr.io/manyfold3d/manyfold:latest | 3214 | Internal |
- **PostgreSQL**: postgres:15 | 5432 | Database |
- **Redis**: redis:7 | 6379 | Cache |
- **manyfold**: ghcr.io/manyfold3d/manyfold:latest - ManyFold Application
- **postgres**: postgres:15 - PostgreSQL Database Server
- **redis**: redis:7 - Redis Cache Server
- **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
### 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
```bash
mkdir -p /DockerVol/postgres_data
chown -R 1964:1964 /DockerVol/postgres_data
mkdir -p /DockerVol/manyfold
chown -R user:group /DockerVol/manyfold
```
### Environment Variables
@ -35,13 +43,7 @@ chown -R 1964:1964 /DockerVol/postgres_data
# generate: openssl rand -hex 32
PUID=1964
PGID=1964
SECRET_KEY_BASE=$(openssl rand -hex 32)
DATABASE_ADAPTER=postgresql
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_USER=manyfold
DATABASE_PASSWORD=F@lcon13
REDIS_URL=redis://redis:6379/1
SECRET_KEY_BASE="OD0CLgELUEWGoZ8IUnduGbxhyhh4vgjMBxBAjyopNOkATWIEWSYeWRDdfY6ulX2Fj7zuUp9dpgzjoFatNviLD8E5Cv2815eDrZxH9gNb52Taur0LzqBPk25yLCvsnjXK"
```
### Deploy
@ -55,9 +57,10 @@ docker stack services manyfold
```
### First Run
Run the following command to initialize the database:
Perform the following steps after deploying the stack:
```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
| Service | URL | Purpose |
|---------|-----|---------|
- **ManyFold**: `http://manyfold.netgrimoire.com` | Application |
- **manyfold**: https://manyfold.netgrimoire.com (main application interface)
- **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
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
This stack connects to other services in NetGrimoire, including:
- PostgreSQL database: `postgresql://manyfold:F@lcon13@postgres:5432/manyfold`
- Redis server: `redis://redis:6379/1`
The manyfold stack integrates with other services in NetGrimoire through environment variables:
- `DATABASE_URL`: used to connect to the PostgreSQL database server.
- `REDIS_URL`: used to connect to the Redis cache server.
---
## Operations
### 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
docker stack services manyfold
```
```bash
docker service logs manyfold
kuma monitor -h http://manyfold:3214
```
### Backups
Store backups of critical data in a persistent volume:
```bash
-DockerVol/manyfold_backup:/var/lib/postgresql/data
```
Critical backups should be performed on a regular schedule to prevent data loss. Use Docker Volume mounting to ensure critical volumes are persisted.
### Restore
Restore the database by initializing it with the following command:
Restore the manyfold service by redeploying the stack:
```bash
psql -U manyfold -d manyfold -c "CREATE DATABASE mydatabase"
cd services/swarm/stack/manyfold
./deploy.sh
```
---
## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
| Service not available | PostgreSQL or Redis not running | Check `docker service logs` and restart services if necessary |
| Data loss | Persistent volume not configured correctly | Configure persistent volumes for critical data |
Failure Mode | 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.
- Redis Cache Errors | "Redis Connection Issues" | Incorrect Redis connection parameters or missing Redis server.
- 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 |
|------|--------|---------|
| 2026-04-28 | 4d037594 | Initial documentation |
| 2026-04-28 | e91d90b6 | Updated environment variables |
| 2026-04-28 | c0c3e483 | Fixed PostgreSQL connection issue |
| 2026-04-28 | 508116c4 | Added Redis monitoring |
| 2026-04-28 | e697c0ef | Improved volume setup for backups |
| 2026-04-28 | c30dbfcb | Initial deployment and documentation of the manyfold stack. |
| 2026-04-28 | 4d037594 | Added critical volume mounting for data persistence. |
| 2026-04-28 | e91d90b6 | Introduced Uptime Kuma monitoring for service health and performance. |
| 2026-04-28 | c0c3e483 | Enhanced PostgreSQL database server configuration for improved performance. |
| 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
Review User Guide and Changelog sections