Skip to main content
Version: v4

Docker Compose

Docker Compose is the recommended way to run SuiviBourse. It deploys the full stack:

  • suivi-bourse-app — the application
  • suivi-bourse-influxdb — a pre-initialized InfluxDB 3 Core instance
  • suivi-bourse-graf — a Grafana with a provisioned datasource and dashboard

Requirements

  • Windows, Linux or macOS
  • Docker (> 19.03)
  • Docker Compose

Steps

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

  2. Move into the docker-compose folder.

  3. Configure your portfolio using one of the two modes:

Edit config.yaml following the manual mode doc:

config.yaml
shares:
- name: Apple
symbol: AAPL
purchase:
quantity: 1
fee: 2
cost_price: 119.98
estate:
quantity: 2
received_dividend: 2.85
  1. Start the stack:
docker compose up -d

Ports

ServicePortPurpose
Grafana3000Dashboards (login admin / admin)
InfluxDB 38181Database HTTP API
App8081Legacy Prometheus /metrics endpoint

Environment variables

Edit the .env file in the docker-compose folder:

.env
SCRAPING_INTERVAL=120

# InfluxDB 3 Configuration
INFLUXDB_DATABASE=suivi_bourse
INFLUXDB_TOKEN=apiv3_suivi-bourse-admin-token-for-local-development
VariableDefaultDescription
SCRAPING_INTERVAL120Price scraping interval (seconds)
INGESTION_INTERVAL300Event ingestion interval (seconds)
BACKFILL_INTERVAL60Backfill check interval (seconds)
BACKFILL_DELAY10Delay between backfill requests (seconds)
BACKFILL_CHUNK_DAYS365Days of history per backfill request
SB_CONFIG_MODEmanualConfiguration mode (manual or events)
INFLUXDB_DATABASEsuivi_bourseInfluxDB database name
INFLUXDB_TOKEN(preset)InfluxDB admin token (matches the provisioned token)
GF_ADMIN_PASSWORDadminGrafana admin password
InfluxDB token

The compose stack ships with a development admin token (apiv3_suivi-bourse-admin-token-for-local-development), preconfigured in both InfluxDB and the Grafana datasource. Change it before any non-local use by editing influxdb3-token.json, the Grafana datasource under grafana_provisioning/datasources/, and INFLUXDB_TOKEN in .env.

File structure

After setup, your docker-compose folder looks like:

docker-compose/
├── .env
├── config.yaml # Your portfolio configuration
├── docker-compose.yaml
├── influxdb3-init.sh # InfluxDB 3 bootstrap (creates the database)
├── influxdb3-token.json # InfluxDB admin token (dev default)
└── grafana_provisioning/
├── datasources/ # InfluxDB SQL datasource
└── dashboards/ # "Stock share monitoring" dashboard

Development stack

A docker-compose.dev.yaml is also provided. It builds the app image locally, runs InfluxDB without authentication, enables DEBUG logging, and also serves this documentation site. It defaults to events mode:

docker compose -f docker-compose.dev.yaml up -d