Development
Start the Compose stack's PostgreSQL and SeaweedFS and create the buckets:
docker compose -f deploy/docker-compose.yml up -d postgresql seaweedfs-s3 seaweedfs-create-buckets
Point Relic at the Compose services and set the admin password:
export RELIC_DATABASE_URL='postgres://relic:relic@localhost:5432/relic?sslmode=disable'
export RELIC_OBJECT_STORAGE_ENDPOINT=http://localhost:8333
export RELIC_OBJECT_STORAGE_ACCESS_KEY=relic-dev-access-key
export RELIC_OBJECT_STORAGE_SECRET_KEY=relic-dev-secret-key-not-for-production
export RELIC_ADMIN_PASSWORD=password
Start the server:
go run ./cmd/relic server start
It serves HTTPS at https://localhost:8090 with a certificate authority in
~/.config/relic/tls (TLS).
In a second shell with the same exports, move the worker's metrics off the
server's :8091:
export RELIC_METRICS_LISTEN_ADDRESS=:8092
Start the worker:
go run ./cmd/relic server worker
A plain checkout does not embed the web UI, so / answers "UI not built into
this binary" (the noui build tag leaves it out even after task ui). Run the
UI dev server instead. It proxies API calls to https://localhost:8090, or to
RELIC_BACKEND.
Install the web dependencies:
pnpm -C web install
Make Node.js trust the server's certificate authority:
export NODE_EXTRA_CA_CERTS="$HOME/.config/relic/tls/ca.crt"
Start the UI dev server:
pnpm -C web dev
Open http://localhost:3000.
Taskfile
Taskfile.yml wraps these commands; task lists them.
| Task | Does |
|---|---|
task run | Runs a single node from source on SQLite and the filesystem store in ~/.local/share/relic-dev (DATA_DIR, PORT) |
task run:postgres | Runs the same against the Compose PostgreSQL and SeaweedFS |
task run:docker | Builds the image and runs it as one container on volumes |
task stack | Starts the full Compose stack |
task install | Builds relic with the web UI into ~/.local/bin (BIN_DIR) |
task cli:install | Builds relic without the web UI (-tags noui) |
task service | Runs install, then relic server setup |
task gen, fmt, lint, test, test:integration, e2e | Code generation and checks |
The run tasks use admin / password, a fixed encryption key and
$DATA_DIR/tls; task web runs the UI dev server trusting that authority.