v0.7.0

Configuration

Last updated


HakoRun is configured entirely through environment variables; the Makefile loads .env from the project root.

Create the Config File


  1. cp .env.example .env

Variables that are unset or fail to parse as numbers fall back to their defaults (internal/utils/getEnv.go).

Server and Execution


VariableDefaultDescription
HTTP_PORT8080HTTP listen port
CODE_MAX_SIZE262144 (256 KiB)Request body byte limit for /run and /run-now
TIMEOUT_SCRIPT30Script timeout in seconds; the effective deadline adds 5 seconds
MAX_CPUS1CPU cores for hakorun.slice, written as CPUQuota = N × 100% (Linux only)
MAX_MEMORY128MMemoryMax of hakorun.slice in systemd units (Linux only)

Redis (-tags redis only)


VariableDefaultDescription
REDIS_HOSTlocalhostHost
REDIS_PORT6379Port
REDIS_PASSWORDemptyPassword
REDIS_DB0Database index
REDIS_TIMEOUT_SECONDS5Dial, read, write, and pool timeout in seconds

The default ToriiDB build reads no REDIS_* variables.

中文