diff --git a/Dockerfile b/Dockerfile index 7c12acf..37a6b44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-slim as application +FROM python:3.12-slim AS application WORKDIR /app @@ -10,7 +10,6 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" COPY src /app/src COPY requirements.lock pyproject.toml /app/ RUN pip install --no-cache-dir -r requirements.lock -RUN edge-proxy-render-config EXPOSE 8000 diff --git a/src/edge_proxy/settings.py b/src/edge_proxy/settings.py index 2c5dfdd..fdc3647 100644 --- a/src/edge_proxy/settings.py +++ b/src/edge_proxy/settings.py @@ -59,7 +59,13 @@ def json_config_settings_source() -> dict[str, Any]: at the project's root. """ encoding = "utf-8" - return json.loads(Path(CONFIG_PATH).read_text(encoding)) + try: + config = json.loads(Path(CONFIG_PATH).read_text(encoding)) + logger.info(f"Loaded configuration from {CONFIG_PATH}") + return config + except FileNotFoundError: + logger.info(f"Configuration file at {CONFIG_PATH} not found") + return {} class EnvironmentKeyPair(BaseModel):