Docker Installation#
Docker Compose is the fastest way to run IncidentRelay for testing, demos and simple self-hosted deployments.
The default Compose setup starts:
incidentrelay # HTTP API, UI, incoming webhooks
incidentrelay-scheduler # reminders, escalations, periodic jobs
incidentrelay-telegram # Telegram callbacks / polling worker
incidentrelay-slack # Slack Socket Mode worker
The Telegram and Slack workers are harmless when the corresponding integrations are not configured. PostgreSQL is optional. SQLite is suitable for small installations and quick starts.
Default architecture#
Docker Compose
├── incidentrelay
│ └── Gunicorn + Flask application
├── incidentrelay-scheduler
│ └── standalone scheduler worker
├── incidentrelay-telegram
│ └── Telegram callbacks / polling
├── incidentrelay-slack
│ └── Slack Socket Mode interactions
└── incidentrelay-data
└── SQLite database volume
Default SQLite path inside the container:
/var/lib/incidentrelay/incidentrelay.db
Default config path inside the container:
/etc/incidentrelay/incidentrelay.conf
The config file is selected by:
INCIDENTRELAY_CONFIG_FILE
Quick start with SQLite#
docker compose up -d
Open the UI:
http://SERVER_IP:8080/login
Show logs:
docker compose logs -f incidentrelay
docker compose logs -f incidentrelay-scheduler
Run migrations#
If migrations are not run automatically by your container entrypoint, run:
docker compose exec incidentrelay python manage.py migrate
Create the first admin user#
docker compose exec incidentrelay \
python manage.py create-admin \
--username admin \
--password 'change-me-123' \
--email admin@example.com
Change the password and email before production use.
Default SQLite config#
File:
docker/incidentrelay.docker.conf
Example:
[main]
log_level = INFO
log_file = /var/log/incidentrelay/incidentrelay.log
[server]
host = 0.0.0.0
port = 8080
public_base_url = http://localhost:8080
[database]
type = sqlite
name = /var/lib/incidentrelay/incidentrelay.db
[sqlite]
wal = true
busy_timeout = 5000
[voice]
provider = stub
providers_dir = /usr/local/lib/incidentrelay/voice_providers
callback_secret =
PostgreSQL variant#
Use PostgreSQL for:
- larger teams;
- higher alert volume;
- multiple web workers;
- longer-term production installations.
Start with PostgreSQL if the repository provides a PostgreSQL Compose override:
docker compose \
-f docker-compose.yml \
-f docker-compose.postgres.yml \
up -d
PostgreSQL config example:
[database]
type = postgresql
host = postgres
port = 5432
name = incidentrelay
user = incidentrelay
password = incidentrelay-change-me
External access#
With this mapping:
ports:
- "8080:8080"
IncidentRelay is available on:
http://SERVER_IP:8080
if the firewall allows port 8080.
For production, it is better to expose IncidentRelay through Nginx or HAProxy with HTTPS:
Internet -> Nginx/HAProxy :443 -> IncidentRelay :8080
Set the public URL correctly:
[server]
public_base_url = https://incidentrelay.example.com
public_base_url is used for generated links and callbacks.
Custom voice providers#
Custom voice providers can be mounted into:
/usr/local/lib/incidentrelay/voice_providers
Example Compose mount:
volumes:
- ./custom_voice_providers:/usr/local/lib/incidentrelay/voice_providers:ro
After changing provider files, restart the containers:
docker compose restart incidentrelay incidentrelay-scheduler