Skip to content

Commit

Permalink
Fix metrics location filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Jun 5, 2024
1 parent e5e58d5 commit fd4451a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
context: ./metrics
dockerfile: Dockerfile
volumes:
- ./data:/data
- ./www:/usr/src/metrics/www
logging:
driver: "json-file"
options:
Expand Down
6 changes: 5 additions & 1 deletion metrics/src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@
BLOCK_SAMPLING = 100
GAS_ESTIMATION_ITERATIONS = 300

METRICS_FILEPATH = os.path.join('/', 'data', 'metrics.json')
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
PROJECT_PATH = os.path.join(DIR_PATH, os.pardir)

NGINX_WWW_FOLDER = os.path.join(PROJECT_PATH, 'www')
METRICS_FILEPATH = os.path.join(NGINX_WWW_FOLDER, 'metrics.json')

0 comments on commit fd4451a

Please sign in to comment.