diff --git a/docker-compose.yml b/docker-compose.yml index 2ef6c94..9f90df9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,7 +43,7 @@ services: context: ./metrics dockerfile: Dockerfile volumes: - - ./data:/data + - ./www:/usr/src/metrics/www logging: driver: "json-file" options: diff --git a/metrics/src/config.py b/metrics/src/config.py index 69cf76b..b83fbb9 100644 --- a/metrics/src/config.py +++ b/metrics/src/config.py @@ -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')