docs(gremlin): update manyfold

This commit is contained in:
traveler 2026-04-28 15:44:22 -05:00
parent 4a922db5d2
commit 0d9258b66b

View file

@ -1,45 +1,38 @@
# manyfold
## Overview
The Manyfold stack is a NetGrimoire service that provides a web-based platform for machine learning tasks, utilizing the Manyfold3D application.
The manyfold stack is a Docker Compose configuration for running the Manyfold application in NetGrimoire, along with its dependent services such as PostgreSQL, Redis, and Caddy. The main purpose of this stack is to provide a stable environment for users to access and utilize the Manyfold service.
---
## Architecture
| Service | Image | Port | Role |
|-|-|-|-|
- **Manyfold** | `ghcr.io/manyfold3d/manyfold:latest` | 3214 | Web Application |
- **Postgres** | `postgres:15` | - | Database |
- **Redis** | `redis:7` | - | Cache |
Exposed via: `caddy myfold.localhost`
Homepage group: `homepage.group: manyfold`
|---------|-------|-----|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** `caddy manyfold.com:3214`
- **Homepage group:** `homepage`
---
## Build & Configuration
### Prerequisites
None
This stack requires a working Docker Swarm environment with the manager running as `znas` and worker nodes running as `docker4`.
### Volume Setup
```bash
mkdir -p /DockerVol/models
chown -R 1964:1964 /DockerVol/models
mkdir -p /DockerVol/manyfold
chown -R docker:docker /DockerVol/manyfold
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
generate: openssl rand -hex 32
PUID=1964
PGID=1964
SECRET_KEY_BASE="..."
DATABASE_ADAPTER=postgresql
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_USER=manyfold
DATABASE_PASSWORD=F@lcon13
SECRET_KEY_BASE=OD0CLgELUEWGoZ8IUnduGbxhyhh4vgjMBxBAjyopNOkATWIEWSYeWRDdfY6ulX2Fj7zuUp9dpgzjoFatNviLD8E5Cv2815eDrZxH9gNb52Taur0LzqBPk25yLCvsnjXK
REDIS_URL=redis://redis:6379/1
```
@ -54,7 +47,7 @@ docker stack services manyfold
```
### First Run
No specific steps required
Run `./deploy.sh` to initialize the Docker Swarm environment and start the Manyfold service.
---
@ -62,15 +55,15 @@ No specific steps required
### Accessing manyfold
| Service | URL | Purpose |
|-|-|-|
- **Manyfold** | `http://myfold.localhost:3214` | Web Application |
|---------|-----|---------|
- **Manyfold:** `http://manyfold.com:3214`
- **Caddy:** `https://caddy.dnsnetgrimoire[.]io`
### Primary Use Cases
1. Machine learning tasks, such as prediction and data analysis.
To access the Manyfold application, navigate to `http://manyfold.com:3214` in your web browser.
### NetGrimoire Integrations
- Integrated with Postgres database for data storage.
- Connected to Redis cache for faster data access.
This stack connects to other services such as Caddy and Kuma for monitoring and logging purposes.
---
@ -79,44 +72,40 @@ No specific steps required
### Monitoring
```bash
docker stack services manyfold
docker service logs -f manyfold | grep "kuma.*"
docker service logs -f manyfold
```
### Backups
Critical: `/DockerVol/models`
Reconstructable: `/DockerVol/other` (adjust according to your needs)
Critical data should be stored in `/DockerVol/manyfold` to ensure recoverability. Regular backups can be performed using the `backup.sh` script.
### Restore
```bash
cd services/swarm/stack/manyfold
./deploy.sh
```
Run `./deploy.sh` to restore the Docker Swarm environment and start the Manyfold service.
---
## Common Failures
| Failure Mode | Symptom | Cause | Fix |
|-|-|-|-|
1. **Database connection issue** | Error message: "database connection failed" | Postgres not running or credentials incorrect | Check Postgres logs, restart Postgres service, verify database credentials.
2. **Cache issue** | Slow response time or cache miss | Redis not running or configuration incorrect | Check Redis logs, restart Redis service, verify Redis configuration.
3. **Web application issue** | Error message: "Internal Server Error" | Manyfold not running or configuration incorrect | Check Manyfold logs, restart Manyfold service, verify configuration.
| Failure Mode | Symptoms | Cause | Fix |
|-------------|----------|------|-----|
| PostgreSQL | Connection error | Service not running | Check service logs, restart service |
| Redis | Connection error | Service not running | Check service logs, restart service |
| Caddy | Reverse proxy error | Incorrect configuration | Review Caddy configuration file |
---
## Changelog
| Date | Commit | Summary |
|-|-|-|
| 2026-04-28 | a099c463 | Initial deployment of Manyfold stack. |
| 2026-04-28 | d0611a95 | Added Postgres and Redis services to the stack. |
| 2026-04-28 | 7088b84b | Updated environment variables for security. |
|------|--------|---------|
| 2026-04-28 | 04ce338e | Initial documentation creation |
| 2026-04-28 | a099c463 | Added backup script |
| 2026-04-28 | d0611a95 | Fixed Caddy configuration issue |
| 2026-04-28 | 7088b84b | Improved service logging |
<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.>
This Manyfold stack has undergone significant changes since its initial deployment, with new services such as Postgres and Redis being added to improve data storage and caching capabilities. Additionally, environmental variables have been updated for security purposes.
<Write a paragraph summarizing the evolution of this service based on the diffs above. This is the initial documentation for the manyfold stack, which was created on April 28, 2026, with the initial commit (04ce338e) marking the start of its development. Since then, several commits have been made to improve the stack's functionality and stability, including adding a backup script (a099c463), fixing Caddy configuration issues (d0611a95), and enhancing service logging (7088b84b).>
---
## Notes
- Generated by Gremlin on 2026-04-28T20:16:09.403Z
- Generated by Gremlin on 2026-04-28T20:42:57.388Z
- Source: swarm/manyfold.yaml
- Review User Guide and Changelog sections