mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 22:12:15 +00:00
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
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'
|
|
|
|
config_schema_json = local_config_dir / 'config.schema.json'
|
|
|
|
# remote paths (always forward / on 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()
|