All server settings are defined using environment variables
This tutorial walks you through a quick setup of Authority, a PostgreSQL instance, and a simple User Login & Consent App based on Docker Compose. You need to have the latest and version installed.
Authority project contains a simple Dockerfile that compiles and builds a simple docker image with little to no dependencies.
To start using Authority run the following command
To change the Authority server configuration change the local.env file
Environment Variable
Default Value
Description
CRYSTAL_ENV
Development
CRYSTAL_LOG_SOURCES
"*"
CRYSTAL_LOG_LEVEL
debug
CRYSTAL_WORKERS
4
the number of CPU cores to use
PORT
4000
PORT_REUSE
true
HOST
0.0;0.0
Binds the server to a particular ip address on the host machine
DATABASE_URL
postgres://auth_user:auth_pass@db:5432/authority_db?initial_pool_size=10&checkout_timeout=3P
PostgreSQL database connection URL
SECRET_KEY
secret_key
The encryption key to use signed JWTs
CODE_TTL
5
Duration in seconds
ACCESS_TOKEN_TTL
60
Duration in seconds
TEMPLATES_PATH
./public/templates
SESSION_KEY
session_id
BASE_URL
DEVICE_CODE_TTL
300
Duration in seconds
SSL_CERT
""
SSL_KEY
""
SSL_CA
""
SSL_MODE
""