Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Docker Example

Build the image

docker build -t signals .

With version metadata:

docker build \
  --build-arg VERSION=0.2.0 \
  --build-arg COMMIT=$(git rev-parse --short HEAD) \
  -t signals:0.2.0 .

Run with environment variables

docker run -d --name signals \
  -e SIGNALS_TARGET_HOST=db.example.com \
  -e SIGNALS_TARGET_USER=signals \
  -e SIGNALS_TARGET_DBNAME=postgres \
  -e SIGNALS_TARGET_PASSWORD_ENV=PG_PASSWORD \
  -e PG_PASSWORD=your_password \
  -e SIGNALS_ALLOW_INSECURE_PG_TLS=true \
  -e SIGNALS_ENV=dev \
  -e SIGNALS_API_TOKEN=dev-local-only-replace-in-prod-32chars \
  -v signals-data:/data \
  -p 8081:8081 \
  signals

Run with a config file

docker run -d --name signals \
  -v /path/to/signals.yaml:/etc/signals/signals.yaml:ro \
  -v signals-data:/data \
  -p 127.0.0.1:8081:8081 \
  signals --config /etc/signals/signals.yaml

Collect and export

# Trigger collection
curl -X POST http://localhost:8081/collect/now \
  -H "Authorization: Bearer dev-local-only-replace-in-prod-32chars"

# Download snapshot
curl -o snapshot.zip http://localhost:8081/export \
  -H "Authorization: Bearer dev-local-only-replace-in-prod-32chars"

# Inspect
unzip -l snapshot.zip

Docker Compose (with PostgreSQL)

A ready-to-use Docker Compose file is available at examples/docker-compose.yml. It starts Elevarq Signals alongside PostgreSQL 16 with a pre-configured monitoring role:

docker compose -f examples/docker-compose.yml up -d

Container details

  • Base: Alpine 3.21
  • User: non-root (UID 10001)
  • Init: tini
  • Volume: /data for SQLite
  • Port: 8081

Safe role vs superuser

By default, Elevarq Signals blocks superuser roles. For local Docker testing with postgres, set SIGNALS_ALLOW_UNSAFE_ROLE=true. For production, use a dedicated signals role with pg_monitor.

See also: docs/container.md