# docker-compose Stack
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 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 |
|---------|-------|------|------|
- **Host:** `znas`
- **Network:** `netgrimoire`
- **Exposed via:** `deploy-agent:5000`, `deploy-agent.netgrimoire.com`
- **Homepage group:** `Gremlin`

---

## Build & Configuration

### Prerequisites
No specific prerequisites for this stack.

### Volume Setup
```bash
mkdir -p /DockerVol/deploy-agent
chown -R node:node /home/gremlin/services
```

### Environment Variables
```bash
AGENT_SECRET=$(openssl rand -hex 32)
DEPLOY_TIMEOUT=300
LOCAL_HOSTNAME=znas
VOLUME_UID_GID="1964:1964"
KUMA_URL="https://kuma.netgrimoire.com"
```

### 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
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` (Caddy reverse proxy)

### Primary Use Cases
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
This stack connects to other services via environment variables and labels, including `kuma.*`, `homepage.*`.

---

## Operations

### Monitoring
```bash
docker stack services docker-compose
docker service logs -f deploy-agent
```

### Backups
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
```

---

## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
| 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 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-15T02:01:19.183Z
- Source: swarm/stack/GremlinDeployAgent/docker-compose.yml
- Review User Guide and Changelog sections