Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Config

Configuration is possible through both environment variables and a config file. Environment variables take precedence over the config file.

All available options are shown and described in the example config file.

Environment

Config variables start with STRICHRLISTE_. Nested options are separated with double underscores (__).

# Port to bind to.
STRICHRLISTE_PORT=3000

# Set the upper balance limit for accounts in cents.
STRICHRLISTE_BOUNDARIES__ACCOUNT_UPPER=20000

File

The config file is read from data/config.toml.

In the container it is located at /strichrliste/data/config.toml

Example

# Address to bind to.
url = "0.0.0.0"

# Port to bind to.
port = 3000

# Directory the frontend files are located in.
frontend_dir = "frontend"

# Set the timeout a transaction can be undone in seconds. If `false`, users are always allowed to
# undo. To disable undo, set to `0`.
undo_timeout = 600

# Set the duration a user will remain as active after their last interaction (transaction/edit).
# If `false`, users are always active.
user_timeout = 86400

# Set the used currency for the instance. Mainly used for frontend.
currency = "euro"


# Set boundaries for accounts, transactions and the inventory.
[boundaries]
# Set the upper balance limit for accounts in cents. `false` is equal to the upper i32 limit.
account_upper = 20000

# Set the lower balance limit for accounts in cents. `false` is equal to the lower i32 limit.
account_lower = -10000

# Set the (positive/negative) monetary transaction limit. `false` is equal to the i32 limit.
transaction = 10000

# Set the maximum allowed stock. `false` is equal to the upper i32 limit.
#
# If both this and 'inventory_lower' are `false`, all articles are reported as infinitely available
# through faking an override.
inventory_upper = 1000

# Set the minimum allowed stock. `false` is equal to the lower i32 limit.
#
# If both this and 'inventory_upper' are `false`, all articles are reported as infinitely available
# through faking an override.
inventory_lower = 0


# Set options for the backend storage.
[storage]
# Set used storage method.
# Possible values: sqlite
driver = "sqlite"

# If needed, set file location for the storage.
file = "data/database.db"


# Set which features are enabled for the instance.
[capabilities]
# Toggles the builtin frontend. Frontend related information will still be available through the
# api.
frontend = true

# Toggles the article system. Also disables `compensations` if disabled.
articles = true

# Allows to rebalance articles without money transfer.
# `articles` has to be enabled for the feature to work.
compensations = true

# Toggles the inventory system.
inventory = true

# Toggles the ability to optionally set per article inventory boundaries.
inventory_override = true

# Toggles the possibility to set a custom price when filling up articles.
custom_purchase_price = true

# Toggles the possibility for users to directly send money between them.
user_transactions = true


# Sets default options for the frontend.
# Frontend options are passed one to one to the frontend and aren't used by the backend.
[frontend]
# Should the article section on a users page be automatically opened.
auto_open_articles = true

# Values that should be set in the deposit section on a users page.
deposit = [
    100,
    200,
    500,
    1000,
    2000,
]

# Values that should be set in the dispense section on a users page.
dispense = [
    100,
    200,
    500,
    1000,
    2000,
]

# Percentage of random sounds being used, from 0 to 1.
random_sounds = 0.02

# Info shown on cash payment site
cash_info = "register cash payments"