refactor(docker): separate core and optional compose services
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Successful in 13m35s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 6m28s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m24s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 3s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Successful in 13m35s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 6m28s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m24s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 3s
This commit is contained in:
1 parent
25dc4869d2
commit
88033e8e26
25 files changed
+507
-714
No files matched your search
@@ -0,0 +1,78 @@
|
||||
# Docker Compose deployment
|
||||
|
||||
The required stack is PostgreSQL and Heimdall Central. The Agent is deployed
|
||||
separately on each camera-network host; the Central UI supplies a
|
||||
digest-pinned Agent Compose file for each site. RustFS, ntfy, Ollama, TURN,
|
||||
Redis and scheduled backups have separate Compose files and can be left out.
|
||||
|
||||
## Central and database
|
||||
|
||||
Copy `.env.example` to the ignored `docker/.env`, replace every example value,
|
||||
and create the PostgreSQL password file and JWT keys before production use.
|
||||
The database password in `DATABASE_URL` must match `docker/secrets/db_password`.
|
||||
|
||||
```sh
|
||||
mkdir -p -m 700 docker/secrets
|
||||
openssl rand -base64 32 > docker/secrets/db_password
|
||||
cp .env.example docker/.env
|
||||
# Set DATABASE_URL, JWT__KEY, JWT__REFRESHKEY, SERVER_IMAGE_REFERENCE,
|
||||
# and UPDATES_RELEASE_API_URL in docker/.env.
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
The development Compose builds Central from the local source and starts only
|
||||
Central plus PostgreSQL:
|
||||
|
||||
```sh
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.yml up -d
|
||||
```
|
||||
|
||||
## Agent
|
||||
|
||||
Prefer the Compose shown in the Central UI's site installation panel. It uses
|
||||
the image reference and digest from Central's verified release manifest and
|
||||
includes the site token, public Central URL and Agent name. Save it as
|
||||
`docker-compose.yml` beside the trusted `agent-release-public.pem`, then run
|
||||
`docker compose up -d`. Do not substitute a mutable image tag for the digest.
|
||||
|
||||
The repository also provides `docker/docker-compose.agent.yml` for operators
|
||||
who deploy Agents from this checkout. Set `AGENT_IMAGE_REFERENCE`,
|
||||
`HEIMDALL_CENTRAL_URL` and `HEIMDALL_SITE_TOKEN` in the Agent host's env file,
|
||||
copy the trusted public key to `docker/secrets/agent-release-public.pem`, and
|
||||
start it independently:
|
||||
|
||||
```sh
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.agent.yml up -d
|
||||
```
|
||||
|
||||
For local development use `docker/docker-compose.agent.dev.yml` with a
|
||||
development site token and the local Central URL. The published Agent image
|
||||
uses CPU inference. The optional NVIDIA, AMD and Intel Compose overlays only
|
||||
expose hardware for inventory; they do not enable GPU inference.
|
||||
|
||||
## Optional software
|
||||
|
||||
Start Central first to create the shared `heimdall-net` network. Optional
|
||||
services then join that network where applicable, so their Compose projects
|
||||
remain separate while Central can resolve their service names.
|
||||
|
||||
```sh
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.ollama.yml up -d
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.ntfy.yml up -d
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.rustfs.yml up -d
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.coturn.yml up -d
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.redis.yml up -d
|
||||
docker compose --env-file docker/.env -f docker/docker-compose.backup.yml up -d
|
||||
```
|
||||
|
||||
Configure Ollama with `OLLAMA_URL=http://ollama:11434` when enabled. Choose
|
||||
RustFS as the storage provider in Central and use `http://rustfs:9000` as its
|
||||
endpoint. ntfy defaults to `http://ntfy:80`; the UI can also be configured to
|
||||
use an external ntfy server. TURN is not required until WebRTC is enabled.
|
||||
Redis is provided as a standalone service but is not currently required by
|
||||
Central. Backups are independent of the core startup and require the core
|
||||
network and PostgreSQL service to be running.
|
||||
|
||||
See [GPU Agent notes](gpu-runtime.md) and
|
||||
[Agent update signing](agent-release-signing.md) for device access and
|
||||
trusted-key setup.
|
||||
Reference in new issue
Block a user