Skip to main content

Environment Variables and Settings

Environment Variables

As many other applications, Dawarich uses environment variables to configure its behavior. The following environment variables are supported:

Environment VariableDefault ValueDescription
RAILS_ENVdevelopmentApplication environment. development value makes sure all errors will be shown explicitly, making easier remote debugging
REDIS_URLredis://dawarich_redis:6379/0Redis URL
DATABASE_HOSTdawarich_dbDatabase host
DATABASE_USERNAMEpostgresDatabase username
DATABASE_PASSWORDpasswordDatabase password
DATABASE_NAMEdawarich_developmentDatabase name
MIN_MINUTES_SPENT_IN_CITY60Minimum minutes spent in a city
APPLICATION_HOSTlocalhostDefault application host
APPLICATION_HOSTSlocalhost,my.domain.comApplication hosts, provide multiple if you want your Dawarich instance to be available by multiple domains/ip addresses. Don't put protocols here, only host names.
TIME_ZONEEurope/LondonTime zone. Full list of supported timezones available on Github
APPLICATION_PROTOCOLhttpApplication protocol. Change to https if you want your Dawarich instance to be served via SSL
DISTANCE_UNITkmDistance unit. For miles, change to mi. All settings still should be provided in meters/kilometers
REVERSE_GEOCODING_ENABLEDtrue/falseReverse geocoding enabled
PHOTON_API_HOSTphoton.komoot.ioPhoton API host. Useful if you're self-hosting your own Photon instance
RAILS_MAX_THREADS5Connection pool size for the Dawarich database
BACKGROUND_PROCESSING_CONCURRENCY10Background processing concurrency. Should not be higher than RAILS_MAX_THREADS. More info on Sidekiq docs