Deployments
Ops Atlas provides a rolling deployment system with live log streaming, environment variable management, and post-deploy health validation.
How Deployments Work
- Select a service and target environment in the UI
- Ops Atlas connects to the host via SSH
- The compose file is updated and
docker compose up -dis executed - Deployment logs are streamed to the browser in real-time via SSE
- A health check validates the service came up successfully
UI → POST /api/deployment/deploy-stream → SSH → docker compose up -d → Health CheckCompose File Convention
Each service has its own compose file on the target host:
{composeDirectory}/docker-compose.{service}.ymlFor example, a service called api-gateway in a QA environment with compose directory /opt/docker/compose:
/opt/docker/compose/docker-compose.api-gateway.ymlLive 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-streamTIP
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:
| Parameter | Value |
|---|---|
| Timeout | 60 seconds |
| Check interval | 5 seconds |
| Max attempts | 12 |
If the health check fails after the timeout period, the deployment is marked as failed in the UI.
Timeouts
| Operation | Timeout |
|---|---|
| SSH connection | 30 seconds |
| Health check | 60 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