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.
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
-
Download the source code from the latest release and extract it.
-
Install the dependencies from the
appfolder (uv creates an isolated.venvfrom the lockfile):
cd app
uv sync
- Write a
config.yaml(manual mode) — or asettings.yaml+events/directory (events mode) — following the configuration section, in the SuiviBourse config directory:
- Linux / macOS
- Windows
~/.config/SuiviBourse/
%APPDATA%\SuiviBourse\(falls back to%HOME%\AppData\RoamingifAPPDATAis undefined)
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.
- SystemD (Linux)
- Cron (Linux + macOS)
- Windows Service
-
Create a service unit file in
/etc/systemd/system/suivi-bourse.service(replace<user>/<group>and the token):[Unit]Description=SuiviBourseAfter=network-online.target[Service]Type=simpleRestart=alwaysWorkingDirectory=<installation_path>/appExecStart=uv run python src/main.pyUser=<user>Group=<group>Environment=PYTHONUNBUFFERED=1Environment=INFLUXDB_HOST=http://localhost:8181Environment=INFLUXDB_TOKEN=<your-token>Environment=INFLUXDB_DATABASE=suivi_bourseSyslogIdentifier=suivi-bourse[Install]WantedBy=default.targetnoteExecStartmust use an absolute path to theuvbinary (e.g./usr/local/bin/uv) — runwhich uvto find it. -
Reload systemd:
systemctl daemon-reload -
Enable the service at boot:
systemctl enable suivi-bourse -
Start the service:
systemctl start suivi-bourse
Logs go to /var/log/syslog; check the status with
systemctl status suivi-bourse.
Using cron and nohup, you can run the app at boot:
-
Edit your crontab:
crontab -e -
Add the following line (adjust the path and token):
@reboot cd <installation_path>/app && INFLUXDB_HOST=http://localhost:8181 INFLUXDB_TOKEN=<your-token> nohup uv run python src/main.py > $HOME/suivi-bourse.log 2>&1 &
The application logs will be written to $HOME/suivi-bourse.log.
This section is untested. Open a GitHub PR to complete it.
Environment variables
At minimum you must set the InfluxDB connection variables:
| Variable | Default | Description |
|---|---|---|
INFLUXDB_HOST | http://influxdb:8181 | InfluxDB 3 host URL |
INFLUXDB_TOKEN | (required) | InfluxDB API token |
INFLUXDB_DATABASE | suivi_bourse | InfluxDB database name |
SB_SCRAPING_INTERVAL | 120 | Price scraping interval (seconds) |
SB_METRICS_PORT | 8081 | Port for the legacy Prometheus /metrics endpoint |
LOG_LEVEL | INFO | Logging 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.
If you still rely on a Prometheus/Grafana stack, the app keeps exposing a legacy
/metrics endpoint. See Legacy Prometheus endpoint.