Skip to main content

Production Deployment

Lasso is a standard Elixir/Phoenix release. It runs anywhere you can deploy an OTP release: containers, VMs, bare metal, or PaaS platforms.

Building a Release

Or build a Docker image using the included Dockerfile.

Production environment variables

Provider API Keys

Provider URLs in profile YAML support ${ENV_VAR} substitution. Unresolved placeholders crash at startup.
Set the variable in your environment or secrets manager:

Health Check

Use GET /api/health for liveness and GET /api/ready for readiness. Bare /api/ready reports whether the replica itself can serve, and ignores upstream state so one provider outage doesn’t take the whole fleet out of service. Add ?profile=PROFILE&chain=CHAIN when a check should also require an eligible upstream and a fresh head for one route; see readiness. Neither endpoint makes a live upstream request. Pair them with an upstream-backed RPC check for your actual method and provider pool.

HTTPS

Lasso serves HTTP. Terminate TLS at your reverse proxy or load balancer. Set PHX_HOST to your public hostname. Production URL generation defaults to HTTPS; set PHX_SCHEME=http when serving locally without a TLS proxy.

Production Checklist

  • SECRET_KEY_BASE set (64+ bytes)
  • PHX_HOST set to public hostname
  • HTTP server responds to GET /api/health
  • Load balancer uses GET /api/ready, and the intended route answers GET /api/ready?profile=...&chain=... after head observation warms
  • LASSO_NODE_ID set to a unique, stable value
  • Provider credentials set when referenced by profile configuration
  • Health check (GET /api/health) monitored by orchestrator
  • Profile YAML validated with bin/lasso check-config before bin/lasso reload; unresolved ${ENV_VAR} prevents readiness at cold start
  • Client request limits enforced at the reverse proxy; profile rate settings only configure the dashboard tester
  • TLS terminated at reverse proxy / load balancer
  • Console log drain configured; set LOG_FORMAT=json if your collector requires JSON
  • Each node’s GET /metrics scrape restricted to the collector and labeled by instance
  • RPC and dashboard protected by reverse-proxy authentication or a private network boundary (Lasso OSS has no built-in client authentication)
  • If clustering: named nodes, shared cookie, DNS discovery, and private distribution connectivity configured; peers visible in Node.list()
Verify an upstream-backed RPC and a complete subscribe/event/unsubscribe flow after deployment. Preserve the previous image and configuration for rollback.