Install
Docker

Compose settings

Ports, passwords and worker timings of the Compose stack.

Compose reads these variables from the shell or from deploy/.env:

VariableDefaultMeaning
RELIC_PORT8090Host port of the server (HTTPS).
RELIC_POSTGRESQL_PORT5432Host port of PostgreSQL.
RELIC_OBJECT_STORAGE_PORT8333Host port of the S3 gateway.
RELIC_DATABASE_PASSWORDrelicPostgreSQL password.
RELIC_ADMIN_PASSWORDpasswordFirst administrator's password.
RELIC_ENCRYPTION_KEYa development keySeals secrets in the database (Secrets at rest).
RELIC_UPSTREAM_ALLOW_PRIVATE_ADDRESSEStrueRemote repositories and replication may reach private addresses.
RELIC_WEBHOOK_ALLOW_PRIVATE_ADDRESSEStrueWebhooks may deliver to private addresses.
RELIC_TRASH_ENABLEDtruefalse makes deletes permanent.
RELIC_TRUSTED_PROXIESprivate ranges and loopbackProxies whose X-Forwarded-* headers Relic trusts.
RELIC_FAILED_SIGN_INS_BEFORE_BACKOFF20Failed sign-ins per address in ten minutes before backoff.
RELIC_DATABASE_MAX_CONNECTIONS20The server's PostgreSQL connection limit.
RELIC_GARBAGE_COLLECTION_INTERVAL, RELIC_GARBAGE_COLLECTION_GRACE_PERIOD, RELIC_TRASH_RETENTION10m, 1h, 336hWorker timings.
RELIC_OTLP_ENDPOINT(none)Where to send traces.
RELIC_LOG_LEVELinfoLog level.
RELIC_PROFILING_ENABLEDfalsetrue adds /debug/pprof/ to the metrics listener.
RELIC_GRAFANA_PORT, RELIC_PROMETHEUS_PORT3000, 9090Host ports of Grafana and Prometheus.
GRAFANA_ADMIN_PASSWORDadminGrafana's admin password.

Set other settings in the environment of relic-server and relic-worker.

Observability profile

The observability profile adds an OpenTelemetry Collector and Tempo for traces (every trace is kept), Loki and Alloy for the containers' logs, Prometheus (scraping Relic, SeaweedFS and PostgreSQL, with Relic's alert rules) and Grafana with Relic's dashboards.

Start the stack with the profile, sending traces to the collector:

RELIC_OTLP_ENDPOINT=http://otel-collector:4318 \
  docker compose -f deploy/docker-compose.yml --profile observability up --build

Grafana is at http://127.0.0.1:3000 (user admin, password GRAFANA_ADMIN_PASSWORD), Prometheus at http://127.0.0.1:9090. Relic's metrics are reachable inside the Compose network only, at http://relic-server:8091/metrics.