Zenflows is configured through basic POSIX-compliant shell scripts. When you
run mann env.setup
, it'll copy the example template, conf/.example-env.sh
,
to conf/env.sh
. You can edit that file according to your needs. The
available options are mentioned below.
The options here might seem a bit much, but it is to allow flexibility. Please also see the Required Options.
-
DB_HOST
: The hostname or IP address of the database host. The default islocalhost
. -
DB_PORT
: The port number of the database host. The default is5432
. It must be an integer between0
and65535
, inclusive. -
DB_NAME
: The database name of the database host. The default iszenflows
if run in production mode;zenflows_dev
in development mode;zenflows_test
in testing mode. -
DB_USER
: The name of the user/role of the database host. -
DB_PASS
: The passphrane of the user/role of the database host. -
DB_SOCK
: The Unix socket path of the database daemon. -
DB_URI
: The URI connection string. The syntax isscheme://user:pass@host:port/dbname?key0=val0&key1=val1&keyN=valN
, where:-
scheme
is any valid scheme, such asdb
,a
,foo
or evenhttp
; -
user
is the name of the user/role of teh database host. -
pass
is the passphrane of the user/role of the database host. -
host
is the hostname or IP address of the database host. -
port
is the port number of the database host. -
key0=val0
,key1=val1
, andkeyN=valN
query strings are additional, adapter-related options, such asssl=true
andtimeout=10000
. The list of additional options can be viewed at the PostgreSQL Adapter docs.This option should be used if extended configuration is desired (using the options mention in the link above).
-
-
ROOM_URI
: The URI of the Restroom instance. Defaults tohttp://localhost:3000
. -
ROOM_SALT
: The base64-encoded salt to be used with Restroom's keypairoomServer call. -
DID_URI
: The URI of the DID controller instance. Defaults tohttps://did.dyne.org
. -
DID_KEYRING
: Keyring (identity) of the server, it is not defined communication with DID controller is disabled. -
DID_SPEC
: Spec of the newly created dids. -
DID_SIGNER_SPEC
: Spec of the signer did. -
DID_IDENTITY
: Message inside the identity field in the did. -
ADMIN_KEY
: A 64-octect long, lowercase-base16-encoded string used for the authenticating calls from the administrators. Can be generated withopenssl rand -hex 64
. It is automatically generated when you runmann env.setup
. -
GQL_AUTH_CALLS
: Boolean value. It enables the authentication with restroom (each gql request has to be signed). Defaults totrue
. -
GQL_DEF_PAGE_SIZE
: A non-negative integer. It is used for the default GraphQL page size if the client doesn't provide one. -
GQL_MAX_PAGE_SIZE
: A non-negative integer. It is used for the maximum GraphQL page size if client provides a too-large value. It must be greater thanGQL_DEF_PAGE_SIZE
. -
EMAIL_ADDR
: The email address used for sending emails to users. It will appear in the From: field of a message. -
EMAIL_KEY
: The Sendgrid API key used for authentication. -
EMAIL_EXPIRY
: The expiry time of a token that is used for recovery/validation links in emails. It is in seconds, and the default is 4 days worth of seconds. It can't be less than a second.
Some of the options on how to connect to the database and the Restroom intance
are required, along with ADMIN_KEY
that is used authenticating admin calls.
For the emails, you'll need to provide both EMAIL_ADDR
and EMAIL_KEY
as
well.
For the Restroom instance, you only need the ROOM_SALT
option.
About the database, there are only 2 things you need to setup: how to connect to the database host, and what credentials to use.
To specify what credentials to use, you must set DB_USER
and DB_PASS
variables accordingly.
To specify how to connect to the database host, you have 3 options:
- Setting only
DB_HOST
andDB_PORT
. This is the most masic one, and what most people will use. You don't even need to set up any of these, as these have the default values oflocalhost
and5432
. - Setting only
DB_SOCK
. This is to allow people to use Unix sockets. - Setting only
DB_URI
. This is to allow people to provide additional options. It is basically settingDB_HOST
andDB_PORT
in the same variable, plus additional options (that is, you can't use Unix sockets with this option). These options are mutually-exclusive and the order of precedence isDB_URI
>DB_SOCK
>DB_HOST
andDB_PORT
.