crapi-mono
v8.1.0
Published
Below are the various configuration properties the API uses to run as well as their default values when running locally (`npm run start:development`.) These can also always be overriden by specifying them as env vars through Docker or otherwise.
Downloads
3
Readme
Chartroom API README (deprecated)
Below are the various configuration properties the API uses to run as well as their default values when running locally (npm run start:development
.) These can also always be overriden by specifying them as env vars through Docker or otherwise.
The two places where environment configurations "live" is in the config/sailsConfig.js and config/env/$environment file - if it is noted that a config varies across environments, it is most likely set there.
Node/Sails Server Config
LOG_LEVEL (info
)
Sets the log level.
NODE_ENV (local
)
Sets which env/config/$env file to use for configuration. Also configures which database engine and seed strategy to use:
In
local
anddevelopment
, the default, nedb is used, it is seeded using barrels, but it is not persisted to disk..In
production
, themongo
connection is used, and the database is not seeded.
Note: the preferred way to set this variable is by doing npm run start:local|development|production
PORT (8001
)
Sets the port. This should not need to change across environments.
FORCE_SSL (false
, true
in production
)
Forces the server to use SSL for requests.
API Config
CRAPI_CLIENTFS (native
; s3
in production
.)
Configures which file system to use. If this is blank, fileman uses the file system.
CRAPI_PREFIX (/api
; versioned in production
and in development
Rancher)
Configures which API prefix to truncate.
HBKAUTH_ROOT (http://localhost:8001/
; https://auth.dev.hbkapps.com/
in development
, https://auth.hbkapps.com/
in production
)
Configures which authentication instance to use.
Note: this is configured in development
and production
via the config/env/development
file.`
Secrets
Secrets, of course, have no default values, with the exception of HASH_SECRET
, which is set to RANDOMTEXT
in the local
environment. They are managed through a secrets management utility called torus
, or through a .secrets
file. These can also always be overriden by specfiying them through Docker or otherwise.
HASH_SECRET
Which the secret used to hash passwords.
Managed by torus/.secrets/Rancher:
MONGO_URL
Which Mongo connection string to use. Only needed for production
.
SMTP_USERNAME
Which username to use to connect to the SMTP server. Only needed for production
.
SMTP_PASSWORD
Which password to use to connect to the SMTP server. Only needed for production
.
ENCRYPTION_SECRET
A secret to use for various encryption processes. This is used for decrypting JWTs and encrypting/decrypting other fun things which are intentionally not mentioned here.
SESSION_SECRET
A secret used for encrypting sessions.
CRAPI_PRINTINGTOKEN
A secret used to connect to the ESRI print server.
Managed by torus now, but should be assumed from instance profile
These configure how the file manager should connect to s3.
CRAPI_AWSACCESSKEYID
The AWS access key ID