HenniOKF
Documentation

Reference

Variables

All names of environment variables: application, image, local Compose, VPS, backup and browser tests.

The application

Read in lib/env.ts, explained under Environment variables.

VariableRequiredDefaultValid
HENNIOKF_ROOTyesnoneany path, relative to the working directory
HENNIOKF_SYNC_TOKENfor the first adminnoneany non-empty value
HENNIOKF_URLnohttp://localhost:3370an address with http or https
HENNIOKF_AUTH_SECRETnogenerated under users/secretfrom 32 characters
HENNIOKF_SIGN_IN_LIMITno10an integer from 1

The variables of later phases (HENNIOKF_BUNDLES, HENNIOKF_SYNC_MINUTES, HENNIOKF_SOURCE_<NAME>, HENNIOKF_STYLE, HENNIOKF_DESKTOP, HENNIOKF_RELEASE_TOKEN) are planned in spec/data.md and come here with their phase.

From the image

VariableValueFrom
HENNIOKF_ROOT/henniokfdocker/Dockerfile
HENNIOKF_COMMITthe short commit, optionally with +dirtybuild argument COMMIT
HENNIOKF_BUILT_ATthe build timebuild argument BUILT_AT
PORT3370docker/Dockerfile, read by server.js
HOSTNAME0.0.0.0docker/Dockerfile, read by server.js
NODE_ENVproductiondocker/Dockerfile

Compose locally

docker/compose.local.yml, from the environment of the call:

VariableRequiredDefault
LOCAL_ROOT_DIRyesnone, Compose stops otherwise
LOCAL_PORTno3370
HENNIOKF_SYNC_TOKENfor the first adminempty
HENNIOKF_URLnoempty, then the default of the application applies
COMMIT, BUILT_ATnoempty

VPS

docker/compose.vps.yml, from docker/.env after docker/vps.env.example:

VariableRequiredDefaultWhat
HENNIOKF_HOSTyesnone<subdomain>.<domain>, from it HENNIOKF_URL=https://<host>
HENNIOKF_SYNC_TOKENyesnonethe instance token
HENNIOKF_DATAno/srv/henniokfthe root directory on the VPS
HENNIOKF_IMAGEnoghcr.io/arpablo/henniokf:latestanother image or a fixed state
TRAEFIK_NETWORKnotraefik-proxythe network of Traefik
TRAEFIK_ENTRYPOINTnowebsecurethe entry point for HTTPS
TRAEFIK_CERTRESOLVERnoletsencryptthe certificate resolver

Backup

docker/backup.sh, from the environment of the call:

VariableDefaultWhat
HENNIOKF_DATA/srv/henniokfthe root directory
BACKUP_DIR/srv/henniokf-backupfolder for the archives
BACKUP_DAYS14archives stay this many days
BACKUP_CONTAINERhenniokfthe running container, - without Docker
BACKUP_APP/opt/henniokfthe clone, only with -
BACKUP_COPY_TOemptyoptionally a target for rsync

Browser tests

playwright.config.ts under webServer.env:

VariableValue
HENNIOKF_ROOT.data-e2e, fresh on every run
HENNIOKF_SYNC_TOKENa value only for these tests, in e2e/helpers.ts as TOKEN
HENNIOKF_SIGN_IN_LIMIT100000
HENNIOKF_URLhttp://localhost:3371

CI is set by GitHub Actions. Then Playwright retries a failed test once and forbids test.only. PLAYWRIGHT_BROWSERS_PATH points Playwright to another directory of browsers, for example in a cloud session.