diff --git a/Dockerfile b/Dockerfile index b98f6b2..0eb1d99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ RUN pip install .[server] FROM python:${PYTHON_VERSION}-slim as runtime # Add apt-get system dependecies for runtime here if needed COPY --from=build /venv/ /venv/ +COPY tests/test_data/beamline_parameters.txt tests/test_data/beamline_parameters.txt ENV PATH=/venv/bin:$PATH # change this entrypoint if it is not the same as the repo -ENTRYPOINT ["sh"] +ENTRYPOINT ["config-service"] diff --git a/k8s-config.yaml b/k8s-config.yaml index e4c6803..429b368 100644 --- a/k8s-config.yaml +++ b/k8s-config.yaml @@ -12,11 +12,11 @@ spec: limits: cpu: "1" memory: 300M - - name: config-service-database - image: valkey/valkey:7.2.5-alpine3.19 - command: ["container_service"] - args: [] - resources: - limits: - cpu: "1" - memory: 300M + # - name: config-service-database + # image: valkey/valkey:7.2.5-alpine3.19 + # command: ["container_service"] + # args: [] + # resources: + # limits: + # cpu: "1" + # memory: 300M diff --git a/pyproject.toml b/pyproject.toml index 625d946..9271124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ readme = "README.md" requires-python = ">=3.7" [project.optional-dependencies] -server = ["fastapi", "hiredis", "dls-dodal"] +server = ["fastapi", "redis", "hiredis", "dls-dodal==1.25.0"] dev = [ "copier", "pipdeptree", diff --git a/src/config_service/__main__.py b/src/config_service/__main__.py index 2e80a41..e8dd02d 100644 --- a/src/config_service/__main__.py +++ b/src/config_service/__main__.py @@ -2,7 +2,7 @@ import redis import uvicorn -from dodal.common.beamlines.beamline_parameters import ( +from dodal.beamlines.beamline_parameters import ( BEAMLINE_PARAMETER_PATHS, GDABeamlineParameters, ) @@ -23,7 +23,8 @@ @app.get(ENDPOINTS.BL_PARAM + "{item_id}") def beamlineparameter(item_id: str): - return {item_id: beamline_params.params.get(item_id)} + assert BEAMLINE_PARAMS is not None + return {item_id: BEAMLINE_PARAMS.params.get(item_id)} @app.post(ENDPOINTS.FEATURE + "{item_id}") diff --git a/tests/test_data/test_beamline_parameters.txt b/tests/test_data/beamline_parameters.txt similarity index 100% rename from tests/test_data/test_beamline_parameters.txt rename to tests/test_data/beamline_parameters.txt