Skip to content

Commit

Permalink
make stuff work
Browse files Browse the repository at this point in the history
  • Loading branch information
dperl-dls committed May 24, 2024
1 parent d2c1228 commit 202c6a3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
16 changes: 8 additions & 8 deletions k8s-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/config_service/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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}")
Expand Down
File renamed without changes.

0 comments on commit 202c6a3

Please sign in to comment.