Skip to main content
Version: v4

Overview

SuiviBourse supports two mutually exclusive configuration modes:

ModeSourceBest for
Manualconfig.yamlSimple portfolios, static configuration
Eventsevents/*.csv or events/*.xlsxTransaction history, multiple brokers, evolving portfolios, historical backfill
The modes are mutually exclusive

Switching to events mode ignores config.yaml entirely. There is no automatic migration between modes.

Mode selection priority

SuiviBourse decides which mode to use in this order:

  1. The SB_CONFIG_MODE environment variable (manual or events)
  2. The mode field in settings.yaml
  3. Default: manual

Configuration directory

By default, SuiviBourse looks for its configuration in ~/.config/SuiviBourse/. Inside a container this resolves to /home/appuser/.config/SuiviBourse/.

~/.config/SuiviBourse/
├── config.yaml # Manual mode
├── settings.yaml # Events mode selector + options
└── events/ # Events mode transaction files
├── 2023.csv
├── 2024.csv
└── broker-export.xlsx

Environment variables

All settings can be overridden with environment variables.

Application

VariableDefaultDescription
SB_CONFIG_MODEmanualConfiguration mode (manual or events)
SB_SCRAPING_INTERVAL120Price scraping interval (seconds)
SB_INGESTION_INTERVAL300Event ingestion interval (seconds)
LOG_LEVELINFOLogging level

Backfill (events mode)

VariableDefaultDescription
SB_BACKFILL_INTERVAL60Backfill check interval (seconds)
SB_BACKFILL_DELAY10Delay between yfinance requests (seconds)
SB_BACKFILL_CHUNK_DAYS365Days of history fetched per request

InfluxDB 3

VariableDefaultDescription
INFLUXDB_HOSThttp://influxdb:8181InfluxDB 3 host URL
INFLUXDB_TOKEN(required)InfluxDB API token
INFLUXDB_DATABASEsuivi_bourseInfluxDB database name

Legacy Prometheus endpoint

VariableDefaultDescription
SB_PROMETHEUS_ENABLEDtrueExpose the legacy Prometheus /metrics endpoint
SB_METRICS_PORT8081Port for the /metrics endpoint

See Legacy Prometheus endpoint for details.