Table of contents

Configuration

CodeX Docs can be configured with YAML files. You can view example config file here.

Property Description
port Port to listen on. Default: 3000
host Host to listen on. Default: localhost
uploads Configuration for media uploads
uploads.driver Uploads driver to use. Can be local or s3. Default: local
uploads.local.path Directory to use for storing uploaded files if local driver enabled. Default: ./uploads
uploads.s3.bucket S3 bucket name for storing uploaded files if s3 driver enabled
uploads.s3.region Bucket region
uploads.s3.baseUrl Base URL for serving uploaded images
uploads.s3.keyPrefix Key prefix for storing uploaded images
uploads.s3.accessKeyId AWS IAM user's access key id for accessing bucket
uploads.s3.secretAccessKey AWS IAM user's secret access key for accessing bucket
frontend Frontend configuration
frontend.title Browser tab title. Default: CodeX Docs
frontend.description Browser tab description. Default: Free Docs app powered by Editor.js ecosystem
frontend.startPage Default page to redirect from index page. By default it will be the first page.
misprintsChatId Slack / Telegram chat id for the Misprints Reporting
yandexMetrikaId An id for Yandex Metrica integration
carbon.serve Carbon serve url
carbon.placement Carbon placement
menu Array of links for the right side of the Header. Items can be type of string or object with fields title and uri
auth Authentication configuration
auth.password Password to use to access editor mode
auth.secret Auth secret to JWT signing
hawk Hawk configuration for erros catching 
hawk.frontendToken Hawk token to catch frontend errors
hawk.backendToken Hawk token to catch backend errors
database Database configuration
database.driver Database driver to use. Can be local and mongodb. Default: local
database.local.path Path to folder to use as local database. Default: ./db
database.mongodb.uri MongoDB URI for database connection

You can override fields of config file with environment variables (to pass secrets for example). 

All environment variables that starts with APP_CONFIG_ are used to override config properties. For example, you can pass environment variable with the name APP_CONFIG_auth_password that will override auth.password property.