Install with Docker Compose
The repository has one Compose file per way of running AVACOM:
| File | For |
|---|---|
docker-compose.yml |
Evaluation on one machine: no sign-in, ports on 127.0.0.1 only. Profiles add MSN (msn), Grafana (grafana) and the demo inbox (demo). |
docker-compose.prod.yml |
Production on one host: HTTPS with Caddy, Postgres, sign-in, and every safety check on. |
docker-compose-with-sso.yml |
Single sign-on through your identity provider (setup). |
docker-compose-with-auth.yml |
Evaluation with username and password sign-in. |
docker-compose-with-arq.yml |
Background workers on a Redis-compatible queue (Valkey), for larger installs. |
1. Get the code and build the images
Section titled “1. Get the code and build the images”git clone <your AVACOM repository> avacomcd avacomdocker compose builddocker compose --profile msn build msnThis builds avacom/avacom-ui, avacom/avacom-api, avacom/avacom-realtime and avacom/avacom-msn, tagged
latest. Every build checks the licences of the bundled packages and stops on a disallowed one.
2. Run it
Section titled “2. Run it”For a laptop or a test VM that only you can reach.
docker compose up -d| Service | Address |
|---|---|
| The app | http://localhost:3000 |
The API (its reference at /docs) |
http://localhost:8080 |
| Live updates | ws://localhost:6001 |
There is no sign-in: everyone is an administrator. Approved fixes are simulated (AVACOM_FIX_SIMULATE is on).
Put an OPENAI_API_KEY=... line in a .env file next to docker-compose.yml to turn on the root-cause analysis.
To add the MSN hub, see Run the MSN hub. To fill the pages, see Load the demo.
-
Point a DNS name at the server, for example
avacom.bank.local, with ports 80 and 443 open to your users. -
Create the settings file and add generated secrets:
Terminal window cp .env.prod.example .env.prodpython scripts/generate_secrets.py --missing-from .env.prod >> .env.prodThen edit
.env.prod:Setting Value AVACOM_DOMAINThe DNS name, for example avacom.bank.localAVACOM_PUBLIC_URLThe address users open, for example https://avacom.bank.localAUTH_TYPEDB(username and password) orOAUTH2PROXY(see SSO)AVACOM_DEFAULT_USERNAMEThe first administrator (default avacom)OPENAI_API_KEYOptional: the AI key (AI model and key) generate_secrets.pyfills inAVACOM_JWT_SECRET,NEXTAUTH_SECRET,REALTIME_APP_SECRETandPOSTGRES_PASSWORD, among others. Never commit.env.prod. -
Start it:
Terminal window docker compose -f docker-compose.prod.yml --env-file .env.prod up -d -
Read the first administrator’s password, sign in at
AVACOM_PUBLIC_URL, and change it:Terminal window docker compose -f docker-compose.prod.yml --env-file .env.prod exec avacom-backend cat /state/initial-admin-password
Only Caddy is published: ports 80 and 443, plus 8443, 9443, 7443 and 6443, which serve the website, the docs, the API
and live updates when the server is reached by its IP address. It gets a certificate for AVACOM_DOMAIN and
serves the app. The API is
reached through the app at https://<domain>/backend, which is also where tools post alerts, and live updates at
/websocket. If another proxy owns ports 80 and 443, set AVACOM_HTTP_PORT and AVACOM_HTTPS_PORT.
Every service runs with AVACOM_ENV=production, so each refuses to start with a missing or weak secret or an unsafe
setting. See Production checks.
3. Check it
Section titled “3. Check it”curl -fsS https://avacom.bank.local/backend/healthcheck # the API: {}curl -fsS https://avacom.bank.local/api/healthcheck # the app: {"status":"ok"}docker compose -f docker-compose.prod.yml ps # every service "healthy" or "running"Then connect your sources and set where RCAs go.
Upgrading
Section titled “Upgrading”Pull the new code, build the images again, and start the stack again. The backend applies database migrations when it starts.
git pulldocker compose build && docker compose --profile msn build msndocker compose -f docker-compose.prod.yml --env-file .env.prod up -dBack up before you upgrade.
Backing up
Section titled “Backing up”Back up two volumes: avacom-db (Postgres) and avacom-state (provider credentials and other secrets). Without
the second, restored providers have to be connected again. For MSN, back up msn-state (its signing key and ledger)
and OpenSearch’s snapshots.
docker compose -f docker-compose.prod.yml --env-file .env.prod exec avacom-db pg_dump -U avacom avacom > avacom-$(date +%F).sql