-
-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
Ryu Juheon edited this page Dec 13, 2025
·
8 revisions
This document provides a comprehensive guide to configuring Heliotrope, including all available configuration options, their defaults, and usage examples.
Heliotrope supports three methods of configuration, listed in order of precedence:
- JSON Configuration File
- Command Line Arguments
- Environment Variables
You can specify a JSON configuration file using the --config argument, or by setting the USE_ENV environment variable to true and then using the HELIOTROPE_CONFIG environment variable.
{
"GALLERYINFO_DB_URL": "postgresql+asyncpg://postgres_user:heliotropepasswd@localhost/heliotrope_db",
"INFO_DB_URL": "mongodb://heliotrope:heliotropepasswd@localhost",
"HOST": "0.0.0.0",
"PORT": 8080,
"WORKERS": 4,
"DEBUG": false,
"PRODUCTION": true,
"INDEX_FILES": ["index-japanese.nozomi"]
}All configuration options can be set via command line arguments.
python -m heliotrope --helpEnvironment variables use the HELIOTROPE_ prefix and configuration values are loaded as environment variables only when HELIOTROPE_USE_ENV is set to true.
Note: List values in environment variables should be JSON-formatted strings.
export HELIOTROPE_USE_ENV='true'
export HELIOTROPE_HOST=0.0.0.0
export HELIOTROPE_PORT=8080
export HELIOTROPE_GALLERYINFO_DB_URL="postgresql+asyncpg://user:pass@localhost/db"| Option | Type | Default | Description |
|---|---|---|---|
HOST |
string | 127.0.0.1 |
The hostname to listen on |
PORT |
integer | 8000 |
The port of the webserver |
WORKERS |
integer | 1 |
The number of worker processes to spawn |
DEBUG |
boolean | false |
Enable debug mode |
ACCESS_LOG |
boolean | true |
Enable access logging (use --access-log to disable) |
FORWARDED_SECRET |
string | "" |
Secret for validating forwarded headers |
| Option | Type | Default | Description |
|---|---|---|---|
PRODUCTION |
boolean | false |
Run the server in production mode |
CONFIG |
string | "" |
Path to the JSON configuration file |
SENTRY_DSN |
string | "" |
Sentry DSN for error tracking |
USE_ENV |
boolean | false |
Use environment variables for configuration |
| Option | Type | Default | Description |
|---|---|---|---|
GALLERYINFO_DB_URL |
string | "" |
database URL for gallery information (Recommend PostgresSQL) |
INFO_DB_URL |
string | "" |
MongoDB URL for additional information |
USE_ATLAS_SEARCH |
boolean | false |
Use MongoDB Atlas Search features |
| Option | Type | Default | Description |
|---|---|---|---|
REFRESH_DELAY |
integer | 86400 |
Delay between refresh ggjs tasks (seconds) |