Skip to content

Deployments

Ops Atlas provides a rolling deployment system with live log streaming, environment variable management, and post-deploy health validation.

How Deployments Work

  1. Select a service and target environment in the UI
  2. Ops Atlas connects to the host via SSH
  3. The compose file is updated and docker compose up -d is executed
  4. Deployment logs are streamed to the browser in real-time via SSE
  5. A health check validates the service came up successfully
UI → POST /api/deployment/deploy-stream → SSH → docker compose up -d → Health Check

Compose File Convention

Each service has its own compose file on the target host:

{composeDirectory}/docker-compose.{service}.yml

For example, a service called api-gateway in a QA environment with compose directory /opt/docker/compose:

/opt/docker/compose/docker-compose.api-gateway.yml

Live Log Streaming

Deployments use Server-Sent Events (SSE) to stream logs to the browser as they happen. No polling — the connection stays open until the deployment completes or fails.

POST /api/deployment/deploy-stream
Content-Type: application/json

{
  "service": "api-gateway",
  "environment": "qa"
}

Response: text/event-stream

TIP

Keep the browser tab open during deployment. If you navigate away, the deployment continues on the server but you will lose the live log view.

Environment Variables

Each service can have environment variables configured per environment. These follow the pattern:

.env.{env}

Managing Env Vars

From the deployment page you can:

  • View all env vars for a service in a given environment
  • Edit individual values
  • Delete vars that are no longer needed
  • Migrate env vars from one environment to another (e.g. copy QA vars to Stage as a starting point)

WARNING

Environment variable changes take effect on the next deployment. They are not hot-reloaded into running containers.

Health Check Validation

After a deployment, Ops Atlas validates that the service is healthy:

ParameterValue
Timeout60 seconds
Check interval5 seconds
Max attempts12

If the health check fails after the timeout period, the deployment is marked as failed in the UI.

Timeouts

OperationTimeout
SSH connection30 seconds
Health check60 seconds

Permissions

Deployments require the ADMIN or OPERATOR role. Users with the VIEWER role can see deployment history but cannot trigger new deployments.

API Reference

POST /api/deployment/deploy          # Deploy (synchronous)
POST /api/deployment/deploy-stream   # Deploy with SSE log streaming
GET  /api/deployment/history/{env}   # Deployment history

Released under the MIT License.