Files
openfreemap/ssh_lib/config.py
Zsolt Ero 55dae6776f refactor
2025-10-07 16:22:23 +02:00

34 lines
982 B
Python

import os
from pathlib import Path
class Configuration:
# Local paths relative to this file
local_assets_dir = Path(__file__).parent / 'assets'
local_config_dir = Path(__file__).parent.parent / 'config'
local_modules_dir = Path(__file__).parent.parent / 'modules'
ENV = os.getenv('ENV')
if not ENV:
local_config_jsonc = local_config_dir / 'config.jsonc'
else:
local_config_jsonc = local_config_dir / f'config.{ENV}.jsonc'
# remote paths (always Linux /, not using pathlib)
ofm_dir = '/data/ofm'
remote_config = f'{ofm_dir}/config'
venv_bin = f'{ofm_dir}/venv/bin'
# remote http_host dir
http_host_dir = f'{ofm_dir}/http_host'
http_host_bin = f'{http_host_dir}/bin'
# remote tile_gen_dir
tile_gen_dir = f'{ofm_dir}/tile_gen'
tile_gen_bin = f'{tile_gen_dir}/bin'
planetiler_src = f'{tile_gen_dir}/planetiler_src'
planetiler_bin = f'{tile_gen_dir}/planetiler'
config = Configuration()