Skip to content

Latest commit

 

History

History
28 lines (26 loc) · 3.12 KB

File metadata and controls

28 lines (26 loc) · 3.12 KB

Environment Variables

The following environment variables are specifically support in CodeHarbor and are used to configure the application in addition to the setting files under config/.

Environment Variable Default Description
RAILS_ENV development Specifies the Rails environment which can be configured using the files in config/environments
SECRET_KEY_BASE Specifies a server-side secret for Rails, must be set for production
RAILS_RELATIVE_URL_ROOT / Specifies the subpath of the application, used for links and assets
DATABASE_URL Specifies database parameters to use, rather than those specified in config/database.yml. A valid URL would be postgresql://username:password@host:5432/database?pool=5
WEB_CONCURRENCY Number of physical CPU cores Puma worker count in production for cluster mode
RAILS_MAX_THREADS 3 Maximum Puma thread count per worker
PORT 7500 Default port for the web server
PIDFILE tmp/pids/server.pid Location of the file to store the Puma process ID
SENTRY_DSN Specifies the Sentry error reporting endpoint for the Rails server
SENTRY_JAVASCRIPT_DSN Specifies a list of comma-separated Sentry error reporting endpoints for the frontend used by browsers. A subdomain endpoint for the respective request is preferred, otherwise the first value is used.
SENTRY_CURRENT_ENV Specifies the Sentry environment used for error reporting
SENTRY_TRACE_SAMPLE_RATE 1.0 Specifies the sampling rate for traces in Sentry
RAILS_LOG_LEVEL info in production
debug in development
Specifies how many log messages to print. The available log levels are: debug, info, warn, error, fatal, and unknown.
RAILS_LOG_TO_STDOUT false in production Enables the server to print log output to the command line
RAILS_SERVE_STATIC_FILES true in development and test
false in production
Specifies whether the Rails server should be able to handle requests for non-dynamic resources (e.g., assets)
RAILS_TIME_ZONE UTC Set the time zone and make Active Record auto-convert to this zone for renderings. Run rake -D time for a list of tasks for finding time zone names.
BACKTRACE false Enables more verbose log output from framework code during debugging
TRUSTED_IP in development Enables BetterErrors for the given IP addresses during development
LISTEN_ADDRESS 127.0.0.1 in development Specifies the IP address the Vagrant VM server should attach to during development
HEADLESS false Enables the test environment to work without a window manager for feature tests (e.g., using Vagrant)
BROWSER chrome Specifies the browser to be used for system tests. Supported are chrome or firefox
ACTIVE_STORAGE_SERVICE local Specifies the default ActiveStorage backend in production (configured in config/storage.yml).