CChelar Docs
Operations

Deployment

How to deploy Chelar services using Ansible and Makefile targets.

Deployment Architecture

Deployment is managed by Ansible playbooks that build Docker images locally, push to GHCR, and deploy to Nomad on the target server.

Quick Reference

make deploy                 # Deploy all services to production
make deploy-api             # Deploy Go API only
make deploy-dashboard       # Deploy dashboard only
make deploy-staging         # Deploy all to staging
make deploy-staging-api     # Deploy API to staging

What Happens During Deploy

  1. Build — Docker image built locally (multi-stage)
  2. Push — Image pushed to GitHub Container Registry (GHCR)
  3. Pull — Server pulls the new image
  4. Register — Nomad job spec updated with new image tag
  5. Rolling update — Nomad replaces the running allocation

Ansible Structure

  • ansible/roles/deploy/ — main deploy role
  • ansible/roles/caddy/ — Caddy config + TLS
  • ansible/roles/docker/ — Docker installation
  • ansible/roles/nomad/ — Nomad agent config

Server Access

make ssh                    # SSH into production
make ssh-staging            # SSH into staging
make nomad-ui               # Nomad UI via SSH tunnel (localhost:4646)
make nomad-status           # Quick status check

On this page