Liking cljdoc? Tell your friends :D

Deployment

Build an uberjar

clojure -T:build clean && clojure -T:build uber

This produces target/boundary-*.jar.

Run the server

export JWT_SECRET="your-production-secret-min-32-chars"
export BND_ENV="production"
export DB_URL="jdbc:postgresql://host:5432/myapp"
export DB_PASSWORD="..."

java -jar target/boundary-*.jar server

Environment variables

VariableRequiredDescription

JWT_SECRET

Yes

Minimum 32 characters. Used for signing JWT tokens.

BND_ENV

Yes

development, test, acc, or production.

DB_URL

Production

JDBC connection string.

DB_PASSWORD

Production

Database password.

REDIS_URL

When using cache/jobs

Redis connection URL.

Database migrations

clojure -M:migrate up

Run migrations before starting the server in production.

Docker

A production-ready Dockerfile is included in the starter:

docker build -t my-boundary-app .
docker run -e JWT_SECRET="..." -e BND_ENV=production -p 3000:3000 my-boundary-app

Configuration per environment

Aero reads from resources/conf/{BND_ENV}/config.edn. The production config uses environment variables for all secrets:

;; resources/conf/prod/config.edn
:boundary/db
{:url      #env DB_URL
 :password #env DB_PASSWORD
 :pool-size 20}

:boundary/jwt
{:secret #env JWT_SECRET}

Database recommendations

EnvironmentDatabase

Development

SQLite (zero config)

Tests

H2 in-memory

Staging / Production

PostgreSQL (recommended)

PostgreSQL is required for multi-tenancy (boundary-tenant) and full-text search (boundary-search).

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close