Improved working directory

This commit is contained in:
Sven Heidemann 2021-11-26 08:08:48 +01:00
parent 7c77768697
commit d668d0138f

View File

@ -1,4 +1,5 @@
from datetime import datetime
import os
from typing import Optional
from cpl_core.application import StartupABC
@ -26,6 +27,7 @@ class Startup(StartupABC):
self._config: Optional[ConfigurationABC] = None
async def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
environment.set_working_directory(os.path.dirname(os.path.realpath(__file__)))
configuration.add_environment_variables('GISMO_')
configuration.add_json_file(f'appsettings.json', optional=False)