Deployment
GitLab CI/CD
The pipeline is configured in .gitlab-ci.yml and triggers on semver tags (1.0.0, 1.2.3, etc.).
Steps
- Multi-arch build: Docker images for
linux/amd64andlinux/arm64viadocker buildx - Push to Docker Hub: version tag +
latest
Docker Images
| Image | Description |
|---|---|
cletus/caddy-manager-api | Backend API |
cletus/caddy-manager-ui | Frontend (Nginx) |
cletus/cadmin-agent | Agent |
Trigger a Deployment
bash
git tag 1.2.0
git push origin 1.2.0Updating the Hub
bash
docker compose pull
docker compose up -d
# If migrations are needed
docker compose exec caddy-manager-api node dist/db/migrate.jsUpdating Agents
On each remote server:
bash
docker compose pull cadmin-agent
docker compose up -d cadmin-agentAgents are stateless, restart is seamless.
Rollback
Application
Specify the previous version tag in docker-compose.yml and restart:
bash
docker compose down
# Change to image: cletus/caddy-manager-api:1.1.0
docker compose up -dCaddy Configuration
Configuration rollback is automatic: if Caddy rejects the new configuration, the database modification is reverted and the previous configuration remains active.
