Docker
PostgreSQL and S3
Run a Relic server and worker container against your own PostgreSQL and S3-compatible storage.
You need the image, a PostgreSQL database and two buckets on an S3-compatible store (Storage).
Put the settings in an env file, such as relic.env:
RELIC_DATABASE_URL=postgres://relic:<password>@db.example.com:5432/relic?sslmode=require
RELIC_OBJECT_STORAGE_ENDPOINT=https://s3.eu-central-1.amazonaws.com
RELIC_OBJECT_STORAGE_REGION=eu-central-1
RELIC_OBJECT_STORAGE_ARTIFACTS_BUCKET=example-relic-artifacts
RELIC_OBJECT_STORAGE_TEMPORARY_BUCKET=example-relic-temporary
RELIC_OBJECT_STORAGE_ACCESS_KEY=<access-key>
RELIC_OBJECT_STORAGE_SECRET_KEY=<secret-key>
RELIC_ADMIN_PASSWORD=<admin-password>
RELIC_ENCRYPTION_KEY=<openssl rand -base64 32>
Start a server, with a volume for the certificate authority it generates in
/etc/relic/tls. A container without that volume generates a new authority
when it is recreated, for example to upgrade, and every client has to trust it
again.
docker run -d --name relic --env-file relic.env -p 8090:8090 -v relic-tls:/etc/relic/tls ghcr.io/relicbuild/relic:v0.2.0-beta.4 server start
Start one worker, with a volume for Grype's vulnerability database:
docker run -d --name relic-worker --env-file relic.env \
-v relic-grype:/var/lib/relic/grype ghcr.io/relicbuild/relic:v0.2.0-beta.4 server worker
Add servers behind a load balancer as needed, all with one certificate set with
RELIC_TLS_CERTIFICATE_FILE and RELIC_TLS_KEY_FILE
(TLS). Or run server start --no-tls
behind a proxy that terminates TLS and list it in RELIC_TRUSTED_PROXIES
(Behind a reverse proxy).