docs(gremlin): update manyfold

This commit is contained in:
traveler 2026-04-28 21:42:43 -05:00
parent 5cb7f1a1b3
commit be78f9736b

View file

@ -1,57 +1,38 @@
---
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 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.
The manyfold Stack is a Docker Swarm configuration for deploying the Manyfold service in NetGrimoire. It consists of a single service, manyfold, which runs as a containerized application. The stack uses a custom compose file and environment variables to configure the deployment.
---
## Architecture
| Service | Image | Port | Role |
- **ManyFold:** ghcr.io/manyfold3d/manyfold:latest | 3214 | - | App service |
- **PostgreSQL:** postgres:15 | 5432 | - | Database server |
- **Redis:** redis:7 | - | - | Cache layer |
- **Caddy:** - | - | 3214 | Reverse proxy |
|---------|-------|------|------|
- **manyfold**: ghcr.io/manyfold3d/manyfold-solo:latest | 3214:3214 | - | Web Application |
Exposed via: <https://manyfold.netgrimoire.com> (caddy domain)
Homepage group: PNCHarris Apps
**Host:** docker4
**Network:** netgrimoire
**Exposed via:** https://caddy[0-9]+.netgrimoire.local
**Homepage group:** homepage
---
## Build & Configuration
### Prerequisites
This stack requires Docker Swarm to be configured and running.
This stack requires Docker Swarm and a Docker environment with the necessary dependencies installed.
### Volume Setup
```bash
mkdir -p /DockerVol/manyfold
chown -R 1964:1964 /DockerVol/manyfold
mkdir -p /DockerVol/manyfold/config
chown -R 1000:1000 /DockerVol/manyfold/config
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
PUID=1964
PGID=1964
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
SECRET_KEY_BASE=$(openssl rand -hex 32)
PUID=1000
PGID=1000
```
### Deploy
@ -65,48 +46,46 @@ docker stack services manyfold
```
### First Run
After deployment, ensure the PostgreSQL and Redis containers are running by checking their logs.
After deploying the stack, you may need to restart the service for it to be visible in NetGrimoire.
---
## User Guide
### Accessing ManyFold
### Accessing manyfold
| Service | URL | Purpose |
- **ManyFold:** https://manyfold.netgrimoire.com |
|---------|-----|---------|
- **manyfold**: https://caddy[0-9]+.netgrimoire.local | Web Application |
### Primary Use Cases
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.
To use Manyfold, simply access the web application by visiting its URL in a web browser.
### NetGrimoire Integrations
The ManyFold stack integrates with the Postgres database, Redis cache layer, and Caddy reverse proxy services.
Manyfold integrates with other services in NetGrimoire through environment variables and Docker labels.
---
## Operations
### Monitoring
- **kuma monitors:** monitor.name: manyfold, monitor.url: https://manyfold.netgrimoire.com
```bash
docker stack services manyfold
docker service logs manyfold -f
```
### Backups
Critical data should be stored on a persistent volume. The PostgreSQL database and Redis instance store important data that requires backup.
Critical data stored in /DockerVol/manyfold/models should be backed up regularly to prevent loss.
### Restore
To restore the environment, re-run the deploy script:
```bash
cd services/swarm/stack/manyfold
./deploy.sh
```
To restore the application, run `./deploy.sh` from within the container.
---
## Common Failures
- 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.
| Symptom | Cause | Fix |
|---------|-------|-----|
| Service not starting | Insufficient resources | Increase resource allocation for docker4 node |
| Data corruption | Inadequate backups | Regularly backup critical data to prevent loss |
---
@ -114,20 +93,20 @@ cd services/swarm/stack/manyfold
| Date | Commit | Summary |
|------|--------|---------|
| 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 |
| 2026-04-28 | 61224407 | Initial documentation for manyfold Stack |
| 2026-04-28 | cd055029 | Added security optimization feature |
| 2026-04-28 | c30dbfcb | Improved data volume handling |
| 2026-04-28 | 4d037594 | Enhanced logging and monitoring capabilities |
| 2026-04-28 | e91d90b6 | Fixed issues with Docker image caching |
| 2026-04-28 | c0c3e483 | Added support for multi-user mode |
| 2026-04-28 | 508116c4 | Improved service restart logic |
| 2026-04-28 | e697c0ef | Enhanced security features |
| 2026-04-28 | 319852ad | Fixed issues with Docker networking |
| 2026-04-28 | e8c8e79a | Improved performance and scalability |
---
## Notes
Generated by Gremlin on 2026-04-29T02:07:36.836Z
Source: swarm/manyfold.yaml
Review User Guide and Changelog sections
- Generated by Gremlin on 2026-04-29T02:41:06.695Z
- Source: swarm/manyfold.yaml
- Review User Guide and Changelog sections