Skip to content

Commit 115c56b

Browse files
authored
Merge pull request #155 from Flagsmith/fix/render-config
fix(ci): Don't render config in Dockerfile
2 parents 27101dc + 2458019 commit 115c56b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim as application
1+
FROM python:3.12-slim AS application
22

33
WORKDIR /app
44

@@ -10,7 +10,6 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
1010
COPY src /app/src
1111
COPY requirements.lock pyproject.toml /app/
1212
RUN pip install --no-cache-dir -r requirements.lock
13-
RUN edge-proxy-render-config
1413

1514
EXPOSE 8000
1615

src/edge_proxy/settings.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ def json_config_settings_source() -> dict[str, Any]:
5959
at the project's root.
6060
"""
6161
encoding = "utf-8"
62-
return json.loads(Path(CONFIG_PATH).read_text(encoding))
62+
try:
63+
config = json.loads(Path(CONFIG_PATH).read_text(encoding))
64+
logger.info(f"Loaded configuration from {CONFIG_PATH}")
65+
return config
66+
except FileNotFoundError:
67+
logger.info(f"Configuration file at {CONFIG_PATH} not found")
68+
return {}
6369

6470

6571
class EnvironmentKeyPair(BaseModel):

0 commit comments

Comments
 (0)