Configuration

The application can be configured using environment variables

PostgreSQL

The connection to the postgres database is handled by node-postgresopen in new window, it uses the default postgres environment variables, all available variables can are listed in the official documentationopen in new window

env vardefault
PGHOSTdatabase host connection parameter
PGPORTdatabase port connection parameter
PGUSERdatabase user connection parameter
PGPASSWORDdatabase password connection param
PGDATABASEname of the databasegitseeker

Initial Admin Account

If both environment variables are supplied and no user with the given ADMIN_USER exists yet, a new user with admin priviledges will be created and stored in the database.

env vardefault
ADMIN_USERName of the new admin
ADMIN_PASSPassword for the new admin user

TIP

As explained above, the two environment variables will be ignored after the user has been created and do not need to be supplied after that

Security

env vardefault
BCRYPT_ROUNDSNumber of bcrypt rounds for password hashing8
APP_SECRETJTW token secrets3cr3tplzch4nge
INVITE_EXPIRYExpiry time for register invite links in hours10
SESSION_LIFETIMESession lifetime expressed in seconds or a string describing a time span vercel/msopen in new window24h
SESSION_LIFETIME_REMEMBERRemember-me cookie lifetime expressed in seconds or a string describing a time span vercel/msopen in new window60 days

Application

env vardefault
CTAGS_ENABLEDEnable scoring based on ctags symbolstrue
MAX_RESULTSMaximum amount of results and matches500
COLLAPSE_THRESHOLDCollapse code fragments between two matches in the same line if they are longer than COLLAPSE_THRESHOLD characters100
APP_URLBase URL of the application, primarily used for invite links
APP_PORTWebserver Port8080
LOG_LEVELOnly log messages with a level of LOG_LEVEL or higher (debug < http < socket < info < warn < error)info
LOG_RETENTIONHow many log files should be kept14d
FILE_MAXSIZEFilesize in bytes. Files bigger than this are skipped by the indexer1048576