docs(gremlin): create docker-compose

This commit is contained in:
traveler 2026-04-14 17:52:49 -05:00
parent be725e7080
commit b0d77452b5

View file

@ -0,0 +1,104 @@
# docker-compose Stack
description: Deployment configuration for the Gremlin Deploy Agent in NetGrimoire.
---
## Overview
The Gremlin Deploy Agent stack provides a continuous integration and deployment (CI/CD) solution for managing Docker images in NetGrimoire. The stack consists of a single service, deploy-agent, which runs on node znas. Its purpose is to execute deployment tasks for various services across the swarm.
---
## Architecture
| Service | Image | Port | Role |
|---------|-------|-----|------|
- **deploy-agent**: registry.netgrimoire.com/gremlin-deploy-agent:latest | 5000 | Deploy Agent | CI/CD Executor |
---
## Build & Configuration
### Prerequisites
This stack requires Docker Swarm and Caddy to be running. Additionally, a compatible version of the `docker-compose-stack.yml` file must be present in the same directory.
### Volume Setup
```bash
mkdir -p /DockerVol/deploy-agent
chown -R node:node /DockerVol/deploy-agent
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
AGENT_SECRET=abc123 def456 ghi789 jkl012
```
### Deploy
```bash
cd services/swarm/stack/docker-compose
set -a && source .env && set +a
docker stack config --compose-file docker-compose-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml docker-compose
rm resolved.yml
docker stack services docker-compose
```
### First Run
After the initial deployment, verify that the deploy-agent is running and check for any errors in the logs. Ensure that Caddy and Uptime Kuma are also functional.
---
## User Guide
### Accessing docker-compose
| Service | URL | Purpose |
- **Deploy Agent**: https://deploy-agent.netgrimoire.com | CI/CD Executor |
### Primary Use Cases
Use the deploy-agent service to manage deployments for various services in NetGrimoire, such as Docker images and other containerized applications.
### NetGrimoire Integrations
The deploy-agent service integrates with other NetGrimoire services, including Caddy (reverse proxy), Uptime Kuma (monitoring), and the homepage. These integrations enable seamless communication between services and ensure that deployments are properly tracked and monitored.
---
## Operations
### Monitoring
Uptime Kuma monitors the health of the deploy-agent service.
```bash
docker stack services docker-compose
```
Check Caddy logs for any errors:
```bash
docker service logs -f caddy:5000
```
### Backups
Critical data is stored on the `/DockerVol/deploy-agent` volume. Regular backups should be performed to ensure data integrity.
### Restore
```bash
cd services/swarm/stack/docker-compose
./deploy.sh
```
Restore from backup:
```bash
docker stack undo docker-compose
```
---
## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
- Deploy Agent Not Running | deploy-agent service not started | Check Caddy logs for errors and restart the service |
- Caddy Not Configured Correctly | Caddy configuration file missing or incorrect | Update the `docker-compose-stack.yml` file to reflect the correct Caddy configuration |
---
## Changelog
| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-14 | 6205beee | Initial documentation for docker-compose Stack in NetGrimoire |
---
## Notes
- Generated by Gremlin on 2026-04-14T22:51:43.968Z
- Source: swarm/stack/GremlinDeployAgent/docker-compose.yml
- Review User Guide and Changelog sections