docs(gremlin): update docker-compose

This commit is contained in:
traveler 2026-04-14 21:02:25 -05:00
parent b0d77452b5
commit 68b157eb64

View file

@ -1,33 +1,52 @@
# docker-compose Stack
description: Deployment configuration for the Gremlin Deploy Agent in NetGrimoire.
description: CI/CD Deploy Executor for NetGrimoire
Frontmatter:
---
title: docker-compose Stack
description: CI/CD Deploy Executor for NetGrimoire
published: true
date: 2026-04-15T02:01:19.183Z
tags: docker,swarm,docker-compose,netgrimoire
editor: markdown
dateCreated: 2026-04-15T02:01:19.183Z
---
# docker-compose
## 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.
The GremlinDeployAgent stack is a CI/CD deploy executor for NetGrimoire, responsible for managing the deployment of services and applications within the network.
---
## Architecture
| Service | Image | Port | Role |
|---------|-------|-----|------|
- **deploy-agent**: registry.netgrimoire.com/gremlin-deploy-agent:latest | 5000 | Deploy Agent | CI/CD Executor |
|---------|-------|------|------|
- **Host:** `znas`
- **Network:** `netgrimoire`
- **Exposed via:** `deploy-agent:5000`, `deploy-agent.netgrimoire.com`
- **Homepage group:** `Gremlin`
---
## 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.
No specific prerequisites for this stack.
### Volume Setup
```bash
mkdir -p /DockerVol/deploy-agent
chown -R node:node /DockerVol/deploy-agent
chown -R node:node /home/gremlin/services
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
AGENT_SECRET=abc123 def456 ghi789 jkl012
AGENT_SECRET=$(openssl rand -hex 32)
DEPLOY_TIMEOUT=300
LOCAL_HOSTNAME=znas
VOLUME_UID_GID="1964:1964"
KUMA_URL="https://kuma.netgrimoire.com"
```
### Deploy
@ -41,64 +60,63 @@ 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.
Post-deploy steps are handled automatically by the Docker Compose setup.
---
## User Guide
### Accessing docker-compose
| Service | URL | Purpose |
- **Deploy Agent**: https://deploy-agent.netgrimoire.com | CI/CD Executor |
- **deploy-agent:** `https://deploy-agent.netgrimoire.com` (Caddy reverse proxy)
### Primary Use Cases
Use the deploy-agent service to manage deployments for various services in NetGrimoire, such as Docker images and other containerized applications.
To use this stack, ensure that `docker-compose` is properly configured and running on the `znas` host. This can be done by accessing the `http://deploy-agent.netgrimoire.com/health` endpoint.
### 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.
This stack connects to other services via environment variables and labels, including `kuma.*`, `homepage.*`.
---
## 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
docker service logs -f deploy-agent
```
### Backups
Critical data is stored on the `/DockerVol/deploy-agent` volume. Regular backups should be performed to ensure data integrity.
Critical data is stored in `/DockerVol/deploy-agent`. Reconstructable data is handled through the Docker Compose setup.
### 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 |
| Deploy fails | Network issues | Check network connectivity and resolve any issues. |
| Service not responding | Invalid configuration | Review the configuration files and ensure that they are correct. |
| Caddy issues | Configuration errors | Review the Caddy configuration files and apply any necessary corrections. |
---
## Changelog
| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-14 | 6205beee | Initial documentation for docker-compose Stack in NetGrimoire |
| 2026-04-14 | 6205beee | Initial documentation and migration to swarm configuration. |
<Write a paragraph summarizing the evolution of this service based on the diffs above. This is the initial documentation for the new swarm configuration.>
---
## Notes
- Generated by Gremlin on 2026-04-14T22:51:43.968Z
- Generated by Gremlin on 2026-04-15T02:01:19.183Z
- Source: swarm/stack/GremlinDeployAgent/docker-compose.yml
- Review User Guide and Changelog sections