Skip to main content
Version: v4

Standalone

Standalone mode runs only the Python app. You must provide your own InfluxDB 3 instance (and Grafana, if you want dashboards) to build the stack described in the Design section.

tip

If you don't already run InfluxDB and Grafana, prefer the Docker Compose stack.

Requirements

  • Windows, Linux or macOS
  • Python 3.10+
  • uv (used to manage dependencies)
  • A reachable InfluxDB 3 Core instance and an API token

Preparing steps

  1. Download the source code from the latest release and extract it.

  2. Install the dependencies from the app folder (uv creates an isolated .venv from the lockfile):

cd app
uv sync
  1. Write a config.yaml (manual mode) — or a settings.yaml + events/ directory (events mode) — following the configuration section, in the SuiviBourse config directory:
  • ~/.config/SuiviBourse/
info

Manual mode resolves the config location through the confuse library, so other standard search paths are supported too.

Running the app

From the app folder, provide at least the InfluxDB token and run:

INFLUXDB_HOST=http://localhost:8181 \
INFLUXDB_TOKEN=<your-token> \
uv run python src/main.py

For production, choose one of the following methods.

Replace <installation_path> with the folder where you extracted the project, and <your-token> with your InfluxDB API token.

  1. Create a service unit file in /etc/systemd/system/suivi-bourse.service (replace <user>/<group> and the token):

    [Unit]
    Description=SuiviBourse
    After=network-online.target

    [Service]
    Type=simple
    Restart=always
    WorkingDirectory=<installation_path>/app
    ExecStart=uv run python src/main.py
    User=<user>
    Group=<group>
    Environment=PYTHONUNBUFFERED=1
    Environment=INFLUXDB_HOST=http://localhost:8181
    Environment=INFLUXDB_TOKEN=<your-token>
    Environment=INFLUXDB_DATABASE=suivi_bourse
    SyslogIdentifier=suivi-bourse

    [Install]
    WantedBy=default.target
    note

    ExecStart must use an absolute path to the uv binary (e.g. /usr/local/bin/uv) — run which uv to find it.

  2. Reload systemd:

    systemctl daemon-reload
  3. Enable the service at boot:

    systemctl enable suivi-bourse
  4. Start the service:

    systemctl start suivi-bourse

Logs go to /var/log/syslog; check the status with systemctl status suivi-bourse.

Environment variables

At minimum you must set the InfluxDB connection variables:

VariableDefaultDescription
INFLUXDB_HOSThttp://influxdb:8181InfluxDB 3 host URL
INFLUXDB_TOKEN(required)InfluxDB API token
INFLUXDB_DATABASEsuivi_bourseInfluxDB database name
SB_SCRAPING_INTERVAL120Price scraping interval (seconds)
SB_METRICS_PORT8081Port for the legacy Prometheus /metrics endpoint
LOG_LEVELINFOLogging level

See the configuration overview for the full list.

Grafana dashboard

Point Grafana at your InfluxDB instance using an InfluxDB datasource in SQL query mode, then import the provisioned dashboard from the repository:

An example datasource definition is available in grafana_provisioning/datasources/all.yml.

Prefer Prometheus?

If you still rely on a Prometheus/Grafana stack, the app keeps exposing a legacy /metrics endpoint. See Legacy Prometheus endpoint.