feat: persisting database for dashboards

This commit is contained in:
Ankit Nayan 2021-09-28 18:14:12 +05:30
parent 004dda200c
commit 8fef964485
5 changed files with 5 additions and 2 deletions

View File

@ -31,7 +31,7 @@ services:
volumes: volumes:
- ./prometheus.yml:/root/config/prometheus.yml - ./prometheus.yml:/root/config/prometheus.yml
- ../dashboards:/root/config/dashboards - ../dashboards:/root/config/dashboards
- ./data/signoz/:/var/lib/signoz/
environment: environment:
- ClickHouseUrl=tcp://clickhouse:9000 - ClickHouseUrl=tcp://clickhouse:9000
- STORAGE=clickhouse - STORAGE=clickhouse

View File

@ -30,6 +30,7 @@ services:
volumes: volumes:
- ./prometheus.yml:/root/config/prometheus.yml - ./prometheus.yml:/root/config/prometheus.yml
- ../dashboards:/root/config/dashboards - ../dashboards:/root/config/dashboards
- ./data/signoz/:/var/lib/signoz/
environment: environment:
- ClickHouseUrl=tcp://clickhouse:9000 - ClickHouseUrl=tcp://clickhouse:9000

View File

@ -172,6 +172,7 @@ services:
- "8080:8080" - "8080:8080"
volumes: volumes:
- ../dashboards:/root/config/dashboards - ../dashboards:/root/config/dashboards
- ./data/signoz/:/var/lib/signoz/
environment: environment:
- DruidClientUrl=http://router:8888 - DruidClientUrl=http://router:8888
- DruidDatasource=flattened_spans - DruidDatasource=flattened_spans

View File

@ -168,6 +168,7 @@ services:
volumes: volumes:
- ../dashboards:/root/config/dashboards - ../dashboards:/root/config/dashboards
- ./data/signoz/:/var/lib/signoz/
environment: environment:
- DruidClientUrl=http://router:8888 - DruidClientUrl=http://router:8888
- DruidDatasource=flattened_spans - DruidDatasource=flattened_spans

View File

@ -52,7 +52,7 @@ func NewAPIHandler(reader *Reader, pc *posthog.Client, distinctId string) (*APIH
} }
aH.ready = aH.testReady aH.ready = aH.testReady
err := dashboards.InitDB("signoz.db") err := dashboards.InitDB("/var/lib/signoz/signoz.db")
if err != nil { if err != nil {
return nil, err return nil, err
} }