a few docker-related fixes
This commit is contained in:
@@ -14,4 +14,4 @@ EXPOSE 8000
|
||||
ENV NUM_WORKERS=1
|
||||
ENV OSM_CACHE_DIR=/cache
|
||||
|
||||
CMD ["fastapi", "run", "src/main.py", "--port 8000", "--workers $NUM_WORKERS"]
|
||||
CMD fastapi run src/main.py --port 8000 --workers $NUM_WORKERS
|
||||
|
@@ -2,7 +2,8 @@ import logging.config
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
PARAMETERS_DIR = Path('src/parameters')
|
||||
LOCATION_PREFIX = Path('src')
|
||||
PARAMETERS_DIR = LOCATION_PREFIX / 'parameters'
|
||||
AMENITY_SELECTORS_PATH = PARAMETERS_DIR / 'amenity_selectors.yaml'
|
||||
LANDMARK_PARAMETERS_PATH = PARAMETERS_DIR / 'landmark_parameters.yaml'
|
||||
OPTIMIZER_PARAMETERS_PATH = PARAMETERS_DIR / 'optimizer_parameters.yaml'
|
||||
@@ -16,7 +17,7 @@ OSM_CACHE_DIR = Path(cache_dir_string)
|
||||
import logging
|
||||
import yaml
|
||||
|
||||
LOGGING_CONFIG = Path('log_config.yaml')
|
||||
LOGGING_CONFIG = LOCATION_PREFIX / 'log_config.yaml'
|
||||
config = yaml.safe_load(LOGGING_CONFIG.read_text())
|
||||
|
||||
logging.config.dictConfig(config)
|
||||
|
Reference in New Issue
Block a user