Configuration
The application can be configured using environment variables
PostgreSQL
The connection to the postgres database is handled by node-postgres, it uses the default postgres environment variables, all available variables can are listed in the official documentation
| env var | default | |
|---|---|---|
| PGHOST | database host connection parameter | |
| PGPORT | database port connection parameter | |
| PGUSER | database user connection parameter | |
| PGPASSWORD | database password connection param | |
| PGDATABASE | name of the database | gitseeker |
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 var | default | |
|---|---|---|
| ADMIN_USER | Name of the new admin | |
| ADMIN_PASS | Password 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 var | default | |
|---|---|---|
| BCRYPT_ROUNDS | Number of bcrypt rounds for password hashing | 8 |
| APP_SECRET | JTW token secret | s3cr3tplzch4nge |
| INVITE_EXPIRY | Expiry time for register invite links in hours | 10 |
| SESSION_LIFETIME | Session lifetime expressed in seconds or a string describing a time span vercel/ms | 24h |
| SESSION_LIFETIME_REMEMBER | Remember-me cookie lifetime expressed in seconds or a string describing a time span vercel/ms | 60 days |
Application
| env var | default | |
|---|---|---|
| CTAGS_ENABLED | Enable scoring based on ctags symbols | true |
| MAX_RESULTS | Maximum amount of results and matches | 500 |
| COLLAPSE_THRESHOLD | Collapse code fragments between two matches in the same line if they are longer than COLLAPSE_THRESHOLD characters | 100 |
| APP_URL | Base URL of the application, primarily used for invite links | |
| APP_PORT | Webserver Port | 8080 |
| LOG_LEVEL | Only log messages with a level of LOG_LEVEL or higher (debug < http < socket < info < warn < error) | info |
| LOG_RETENTION | How many log files should be kept | 14d |
| FILE_MAXSIZE | Filesize in bytes. Files bigger than this are skipped by the indexer | 1048576 |