Environment Variables
Environment Variables are used for all settings within the Collections project.
Config Files
Collections attempts to read the .env
file setting as an environment Variable. It has the following structure.
.env
AUTH_SECRET = '04a460c0bd9b99...';
DATABASE_URL = 'postgresql://...';
General
Variable | Description | Default Value |
---|---|---|
PUBLIC_SERVER_ORIGIN | Express Server Origin | http://app.test.com:4000 |
PUBLIC_PORTAL_SUBDOMAIN | Subdomain of the portal | app |
SERVER_HOST | Express Server Host | test.com |
SERVER_PORT | App Server Port | 4000 |
ADMIN_PORT | App Admin Port | 4001 |
NODE_ENV | Node Execution Environment | development |
Storage
Variable | Description | Default Value |
---|---|---|
STORAGE_DRIVER | Driver name of destination storage(local , aws-s3 ) | local |
STORAGE_LOCAL_ROOT | Local storage destination directory | uploads |
STORAGE_KEY | Cloud Storage Access Key | -- |
STORAGE_SECRET | Cloud Storage Secrets | -- |
STORAGE_BUCKET | Cloud Storage Bucket | -- |
STORAGE_REGION | Cloud Storage Region | -- |
Database
Variable | Description | Default Value |
---|---|---|
AUTH_SECRET | Secret for authentication (email provider only) | -- |
DATABASE_URL | URL to connect to PostgreSQL | -- |
Express
Variable | Description | Default Value |
---|---|---|
REQ_LIMIT | Maximum size of request body | 4mb |
Authentication
Variable | Description | Default Value |
---|---|---|
AUTH_GITHUB_ID | ID for GitHub OAuth authentication, obtained from the GitHub Developer Portal. | -- |
AUTH_GITHUB_SECRET | SECRET for GitHub OAuth authentication, obtained from the GitHub Developer Portal. | -- |
AUTH_GOOGLE_ID | ID for Google OAuth authentication, obtained from Google Cloud Platform. | -- |
AUTH_GOOGLE_SECRET | SECRET for Google OAuth authentication, obtained from Google Cloud Platform. | -- |
PUBLIC_AUTH_PROVIDERS | Login method provided by the application. | email,google,github |
CORS
Variable | Description | Default Value |
---|---|---|
CORS_ENABLED | Set to true to enable the entire CORS configuration. | false |
CORS_ORIGIN | Access-Control-Allow-Origin Can be specified as a string or regular expression. You can specify false to disable CORS. | false |
CORS_METHODS | Access-Control-Allow-Methods Pass a comma-separated string of methods to allow. | GET,POST,PATCH,DELETE |
CORS_ALLOWED_HEADERS | Access-Control-Allow-Headers If not specified, reflects the headers specified in the Access-Control-Request-Headers header of the request. | Content-Type,Authorization |
CORS_EXPOSED_HEADERS | Access-Control-Expose-Headers If not specified, custom headers are not exposed. | Content-Range |
CORS_CREDENTIALS | Access-Control-Allow-Credentials Set to true to enable. | true |
CORS_MAX_AGE | Specify an integer value when passing the Access-Control-Max-Age header. | 1800 |
Log
Variable | Description | Default Value |
---|---|---|
PUBLIC_LOG_LEVEL | Log output level (fatal , error , warn , info , debug , trace , silent ) | info |
PUBLIC_LOG_HIDE_OBJECT | Don't display detailed request/response information output by pino. | true |
Variable | Description | Default Value |
---|---|---|
EMAIL_TRANSPORT | Email Sending Provider | sendgrid |
EMAIL_FROM | Email Source Email Address | -- |
EMAIL_SENDGRID_API_KEY | API key for sendgrid | -- |
Editor
Variable | Description | Default Value |
---|---|---|
TIPTAP_PRO_TOKEN | Token for using the TipTap extension. | -- |
System
Variable | Description | Default Value |
---|---|---|
RESERVED_SUBDOMAINS | Reserved subdomains that cannot be assigned to a project. | app |