1
0

Add metabase and improve configuration

This commit is contained in:
Tony Grosinger 2022-07-24 09:04:15 -07:00
parent b5daa7d7b0
commit 4886854cda
4 changed files with 46 additions and 4 deletions

28
.env
View File

@ -1,7 +1,31 @@
# The parent folder containing your ledger files # The parent folder containing configuration data for the various apps.
CONFIG_DIR=config
# The parent folder containing your ledger files.
LEDGER_DIR=data LEDGER_DIR=data
# The name of your primary ledger file
# The name of your primary ledger file (within the LEDGER_DIR).
PRIMARY_LEDGER_FILE=all.ledger PRIMARY_LEDGER_FILE=all.ledger
##
## HLedger
##
HLEDGER_PORT=5000 HLEDGER_PORT=5000
HLEDGER_BASE_URL=http://localhost:5000 HLEDGER_BASE_URL=http://localhost:5000
##
## SQLite Conversion
##
# Will be placed in the LEDGER_DIR and made available to Metabase.
SQLITE_OUTPUT=all.sqlite
##
## Metabase
##
METABASE_PORT=3000
# Will be placed in the CONFIG_DIR.
METABASE_DATABASE=metabase.db

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
data/* data/*
!data/.gitinclude !data/.gitinclude
config/*
!config/.gitinclude
ledgerbil-settings.py ledgerbil-settings.py

0
config/.gitinclude Normal file
View File

View File

@ -2,16 +2,32 @@ version: "3"
services: services:
# TODO: Consider adding https://github.com/sbridges/ledgerble # TODO: Consider adding https://github.com/sbridges/ledgerble
# TODO: Consider adding https://github.com/xitian9/hledger-vega # TODO: Consider adding https://github.com/xitian9/hledger-vega
metabase:
# https://www.metabase.com/
# https://github.com/tgrosinger/metabase-multiarch
image: "ghcr.io/tgrosinger/metabase-multiarch:latest"
environment:
- MB_DB_FILE=/data/${SQLITE_OUTPUT}
ports:
- "${METABASE_PORT}:3000"
volumes:
- "${LEDGER_DIR}:/data"
- "${CONFIG_DIR}/${METABASE_DATABASE}:/metabase.db"
ledger-sqlite: ledger-sqlite:
# https://github.com/tgrosinger/ledger-sqlite # https://github.com/tgrosinger/ledger-sqlite
image: "ghcr.io/tgrosinger/ledger-sqlite:latest" image: "ghcr.io/tgrosinger/ledger-sqlite:latest"
environment: environment:
- LEDGER_FILE=/data/${PRIMARY_LEDGER_FILE} - LEDGER_FILE=/data/${PRIMARY_LEDGER_FILE}
- OUTPUT_FILE=/data/ledger.sqlite - OUTPUT_FILE=/data/${SQLITE_OUTPUT}
- OVERWRITE_OUTPUT=true - OVERWRITE_OUTPUT=true
volumes: volumes:
- "${LEDGER_DIR}:/data" - "${LEDGER_DIR}:/data"
hledger: hledger:
# https://hledger.org
# https://github.com/tgrosinger/hledger-multiarch
image: "ghcr.io/tgrosinger/hledger-multiarch:1.26.1" image: "ghcr.io/tgrosinger/hledger-multiarch:1.26.1"
ports: ports:
- "${HLEDGER_PORT}:5000" - "${HLEDGER_PORT}:5000"