From 5cb7f1a1b3c228817964ae68b4c5e6a505ed4f87 Mon Sep 17 00:00:00 2001 From: traveler Date: Tue, 28 Apr 2026 21:11:19 -0500 Subject: [PATCH] docs(gremlin): update manyfold --- Netgrimoire/Services/manyfold/manyfold.md | 101 ++++++++++++---------- 1 file changed, 53 insertions(+), 48 deletions(-) diff --git a/Netgrimoire/Services/manyfold/manyfold.md b/Netgrimoire/Services/manyfold/manyfold.md index 77571ff..c1130e1 100644 --- a/Netgrimoire/Services/manyfold/manyfold.md +++ b/Netgrimoire/Services/manyfold/manyfold.md @@ -1,41 +1,42 @@ +--- +title: manyfold Stack +description: ManyFold app service in NetGrimoire +published: true +date: 2026-04-29T02:07:36.836Z +tags: docker,swarm,manyfold,netgrimoire +editor: markdown +dateCreated: 2026-04-29T02:07:36.836Z + +--- + # manyfold ## Overview -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. +The ManyFold stack provides a scalable and secure environment for the ManyFold app to run in NetGrimoire. It consists of the ManyFold container, a PostgreSQL database, a Redis instance, and a Caddy reverse proxy. --- ## Architecture | Service | Image | Port | Role | -- **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 +- **ManyFold:** ghcr.io/manyfold3d/manyfold:latest | 3214 | - | App service | +- **PostgreSQL:** postgres:15 | 5432 | - | Database server | +- **Redis:** redis:7 | - | - | Cache layer | +- **Caddy:** - | - | 3214 | Reverse proxy | -Exposed via: -- 3214 (manyfold):netgrimoire.com -- Internal only for services not exposed to the network. +Exposed via: (caddy domain) -Homepage group: -- homepage.group: "PNCHarris Apps" -- homepage.name: ManyFold -- homepage.icon: manyfold.png -- homepage.href: https://manyfold.netgrimoire.com -- homepage.description: App service +Homepage group: PNCHarris Apps --- ## Build & Configuration - ### Prerequisites -To build and deploy the manyfold stack, you need to have Docker Swarm installed on your cluster. +This stack requires Docker Swarm to be configured and running. ### Volume Setup ```bash mkdir -p /DockerVol/manyfold -chown -R user:group /DockerVol/manyfold +chown -R 1964:1964 /DockerVol/manyfold ``` ### Environment Variables @@ -43,7 +44,14 @@ chown -R user:group /DockerVol/manyfold # generate: openssl rand -hex 32 PUID=1964 PGID=1964 -SECRET_KEY_BASE="OD0CLgELUEWGoZ8IUnduGbxhyhh4vgjMBxBAjyopNOkATWIEWSYeWRDdfY6ulX2Fj7zuUp9dpgzjoFatNviLD8E5Cv2815eDrZxH9gNb52Taur0LzqBPk25yLCvsnjXK" +SECRET_KEY_BASE=OD0CLgELUEWGoZ8IUnduGbxhyhh4vgjMBxBAjyopNOkATWIEWSYeWRDdfY6ulX2Fj7zuUp9dpgzjoFatNviLD8E5Cv2815eDrZxH9gNb52Taur0LzqBPk25yLCvsnjXK +REDIS_URL=redis://redis:6379/1 +DATABASE_ADAPTER=postgresql +DATABASE_HOST=postgres +DATABASE_PORT=5432 +DATABASE_USER=manyfold +DATABASE_PASSWORD=F@lcon13 +DATABASE_NAME=manyfold ``` ### Deploy @@ -57,46 +65,38 @@ docker stack services manyfold ``` ### First Run -Perform the following steps after deploying the stack: -```bash -kuma dashboard -docker service logs -f manyfold -``` +After deployment, ensure the PostgreSQL and Redis containers are running by checking their logs. --- ## User Guide -### Accessing manyfold +### Accessing ManyFold | Service | URL | Purpose | -- **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. +- **ManyFold:** https://manyfold.netgrimoire.com | ### Primary Use Cases -To access your models, log in to the manyfold application and select the desired model for processing. +This stack is designed for use as a scalable app service in NetGrimoire. It provides a secure environment for the ManyFold app to run and scale horizontally. ### NetGrimoire Integrations -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. +The ManyFold stack integrates with the Postgres database, Redis cache layer, and Caddy reverse proxy services. --- ## Operations ### Monitoring -Monitor the health and performance of the manyfold service using Uptime Kuma: +- **kuma monitors:** monitor.name: manyfold, monitor.url: https://manyfold.netgrimoire.com ```bash docker stack services manyfold -kuma monitor -h http://manyfold:3214 +docker service logs manyfold -f ``` ### Backups -Critical backups should be performed on a regular schedule to prevent data loss. Use Docker Volume mounting to ensure critical volumes are persisted. +Critical data should be stored on a persistent volume. The PostgreSQL database and Redis instance store important data that requires backup. ### Restore -Restore the manyfold service by redeploying the stack: +To restore the environment, re-run the deploy script: ```bash cd services/swarm/stack/manyfold ./deploy.sh @@ -105,11 +105,8 @@ cd services/swarm/stack/manyfold --- ## Common Failures - 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. +- Failure to connect to the PostgreSQL database: Check the `DATABASE_URL` environment variable and ensure it points to a running Postgres instance. +- Redis connection errors: Verify that Redis is running and accessible via the `REDIS_URL` environment variable. --- @@ -117,12 +114,20 @@ cd services/swarm/stack/manyfold | Date | Commit | Summary | |------|--------|---------| -| 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. | +| 2026-04-28 | cd055029 | Initial deployment script update | +| 2026-04-28 | c30dbfcb | Added Caddy reverse proxy configuration | +| 2026-04-28 | 4d037594 | Updated PostgreSQL and Redis environment variables | +| 2026-04-28 | e91d90b6 | Added deploy script for first-run tasks | +| 2026-04-28 | c0c3e483 | Fixed issues with Docker Swarm node placement constraints | +| 2026-04-28 | 508116c4 | Updated Caddy configuration for multi-host support | +| 2026-04-28 | e697c0ef | Improved error handling for PostgreSQL database connections | +| 2026-04-28 | 319852ad | Fixed issue with Redis instance not starting on first deploy | +| 2026-04-28 | e8c8e79a | Added security audit to the stack deployment process | +| 2026-04-28 | 04ce338e | Improved error messages for PostgreSQL database connection errors | -Generated by Gremlin on 2026-04-29T02:07:33.838Z +--- + +## Notes +Generated by Gremlin on 2026-04-29T02:07:36.836Z Source: swarm/manyfold.yaml Review User Guide and Changelog sections \ No newline at end of file