Grafana dashboard for Binance Trade Bot.
Prerequisites: Docker and docker-compose.
- Copy file
docker-compose.yml.example
todocker-compose.yml
. - Edit
.env
file with the following:
- Line 1 and 2 change your credentials. For example:
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=6783jdhf!
- Line 3, port to use. For example:
GRAFANA_HTTP_PORT=42069
- Relative path of your btb database. For example:
DB_PATH_1=../binance-trade-bot/data/crypto_trading.db
- Run
docker-compose up -d
and go to http://YOUR_PUBLIC_IP:YOUR_PORT in your browser.
If you want to support more than one bot, you can do it by the following:
- Edit
.env
file adding more database paths variables. For example:
DB_PATH_1=../btb-1/data/crypto_trading.db
DB_PATH_2=../btb-2/data/crypto_trading.db
DB_PATH_3=../btb-3/data/crypto_trading.db
- Uncomment lines 10 and 11, or add lines on your
docker-compose.yml
to match the variables you just added in.env
. Note: The variable names need to be the same here and in.env
(see point 1 above). For example:
volumes:
- ${DB_PATH_1}:/app/database-1.db
- ${DB_PATH_2}:/app/database-2.db
- ${DB_PATH_3}:/app/database-3.db
- Edit
grafana/datasource.yml
uncomment or add datasources. Propertypath
insidejsonData
should match the path indocker-compose.yml
volumes (see point 2 above). Note: Don't forget to check that every datasource has its own uniquename
property. Your file should look something like this:
apiVersion: 1
datasources:
- name: btb-database_1
type: frser-sqlite-datasource
access: proxy
isDefault: false
editable: true
jsonData:
path: /app/database-1.db # Same path in docker-compose.yml volumes.
- name: btb-database_2
type: frser-sqlite-datasource
access: proxy
isDefault: false
editable: true
jsonData:
path: /app/database-2.db # Same path in docker-compose.yml volumes.
- name: btb-database_3
type: frser-sqlite-datasource
access: proxy
isDefault: false
editable: true
jsonData:
path: /app/database-3.db # Same path in docker-compose.yml volumes.
If you're using an Oracle Cloud Instance, you'll need to open the selected port in your Oracle web GUI. Only reference I found is this tutorial video.