Configuration
Environment variables and configuration options for Ops Atlas.
Environment Variables
Required
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | postgres://user:pass@host:5432/db |
JWT_SECRET | Secret for JWT tokens (min 64 chars) | Random string |
Optional
| Variable | Default | Description |
|---|---|---|
PORT | 3000 | HTTP server port |
REDIS_URL | redis://localhost:6379 | Redis connection |
LOG_LEVEL | info | Logging level (debug, info, warn, error) |
CORS_ORIGINS | * | Allowed CORS origins |
Authentication
| Variable | Default | Description |
|---|---|---|
AUTH_PROVIDER | local | Auth provider (local, ldap, oauth) |
LDAP_URL | - | LDAP server URL |
OAUTH_CLIENT_ID | - | OAuth client ID |
OAUTH_CLIENT_SECRET | - | OAuth client secret |
Integrations
| Variable | Default | Description |
|---|---|---|
SLACK_WEBHOOK_URL | - | Slack incoming webhook |
DISCORD_WEBHOOK_URL | - | Discord webhook |
SMTP_HOST | - | Email SMTP server |
SMTP_PORT | 587 | SMTP port |
Configuration File
You can also use a config.yaml file:
yaml
server:
port: 3000
host: 0.0.0.0
database:
url: postgres://localhost:5432/opsatlas
pool_size: 10
redis:
url: redis://localhost:6379
auth:
jwt_secret: your-secret-here
session_timeout: 24h
logging:
level: info
format: json
integrations:
slack:
webhook_url: https://hooks.slack.com/...
discord:
webhook_url: https://discord.com/api/webhooks/...Security Best Practices
WARNING
Never commit secrets to version control!
- Use environment variables for secrets
- Rotate JWT secrets periodically
- Use strong, random passwords
- Enable HTTPS in production
- Restrict CORS origins in production