Environments
Ops Atlas manages Docker containers across multiple environments. Each environment represents a deployment target — typically QA, Stage, and Prod.
Environment Model
Every environment is defined by the following properties:
| Property | Description | Example |
|---|---|---|
code | Unique identifier (lowercase) | qa, stage, prod |
displayName | Human-readable label | QA Environment |
hosts | Array of Docker host entries | See below |
dockerPort | Docker daemon port | 2375 (default) |
sshUser | SSH user for remote operations | deploy |
composeDirectory | Path to compose files on host | /opt/docker/compose |
Host Configuration
Each environment contains one or more hosts:
hosts:
- hostname: qa-host-01
ip: 10.0.1.10
enabled: true
- hostname: qa-host-02
ip: 10.0.1.11
enabled: falseSetting enabled: false temporarily excludes a host from operations without removing its configuration.
Setup
Environments can be configured in two ways:
1. Setup Wizard
On first launch, the setup wizard walks you through creating your initial environments. This is the recommended approach for new installations.
2. Settings Page
Navigate to Settings > Environments to add, edit, or remove environments after initial setup. Requires the ADMIN role.
WARNING
Changing environment configuration on a running system takes effect immediately. Verify SSH connectivity before saving changes.
How Connections Work
The backend connects to Docker hosts over SSH:
- Ops Atlas opens an SSH connection to the host using the configured
sshUser - Commands are executed against the Docker daemon on
dockerPort - Container state, logs, and stats are streamed back to the frontend
Browser → Ops Atlas Backend → SSH → Docker Host (port 2375)INFO
SSH key-based authentication is required. Password authentication is not supported. Ensure the sshUser has access to the Docker socket on each host.
API
GET /api/environments # List all environments
GET /api/environments/{code} # Get a single environmentEnvironments are also referenced by code in other API calls:
GET /api/services/{env} # List containers in an environment
POST /api/deployment/deploy # Deploy to a specific environmentBackend Configuration
Environments are persisted in PostgreSQL and can also be seeded via application.yml:
ops:
environments:
- code: qa
displayName: QA
dockerPort: 2375
sshUser: deploy
composeDirectory: /opt/docker/compose
hosts:
- hostname: qa-01
ip: 10.0.1.10
enabled: true