From c7b074da0559c9c5e801b50df79d61fb17f6a2fe Mon Sep 17 00:00:00 2001 From: giles knap Date: Sat, 7 Dec 2024 08:40:26 +0000 Subject: [PATCH] dont set server port env vars --- Dockerfile | 5 +++++ settings/config/pvagw.template | 9 +++++---- start.sh | 10 +++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6641168..08a5048 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,11 @@ FROM ghcr.io/epics-containers/epics-base-runtime:7.0.8ec2 as runtime COPY --from=developer /venv /venv COPY --from=developer /epics/ca-gateway /epics/ca-gateway COPY --from=developer /epics/support/pcas /epics/support/pcas +COPY settings/config /config COPY start.sh get_ioc_ips.py / +RUN apt update && \ + apt install -y \ + python3-distutils && \ + rm -rf /var/lib/apt/lists/* # ENTRYPOINT [ "bash" ] diff --git a/settings/config/pvagw.template b/settings/config/pvagw.template index 5b30167..7d11c30 100644 --- a/settings/config/pvagw.template +++ b/settings/config/pvagw.template @@ -1,6 +1,7 @@ /* pvagw configuration template * - * requires replacement of EPICS_PVA_ADDR_LIST and EPICS_PVA_SERVER_PORT + * requires replacement of IOC server address list for gw client side + * and SERVER PORT for gw server side * */ { @@ -10,9 +11,9 @@ { "name":"theclient", "provider":"pva", - "addrlist":"EPICS_PVA_ADDR_LIST", + "addrlist":"PVA_ADDR_LIST", "autoaddrlist":false, - "serverport":5075, + "serverport":5075 "bcastport":5076 } ], @@ -23,7 +24,7 @@ /* "interface":["127.0.0.1"], */ /* "addrlist":"127.255.255.255", */ "autoaddrlist":false, - "serverport":EPICS_PVA_SERVER_PORT, + "serverport":PVA_SERVER_PORT, /* "bcastport":5076, */ "statusprefix":"sts:" /* "access":"some.acf", */ diff --git a/start.sh b/start.sh index 78188d6..9aa4035 100755 --- a/start.sh +++ b/start.sh @@ -6,21 +6,21 @@ export EPICS_PVA_ADDR_LIST=${IPS:-127.0.0.1} export EPICS_CA_ADDR_LIST=${IPS:-127.0.0.1} # PORTS for CA and PVA -export EPICS_CA_SERVER_PORT=${EPICS_CA_SERVER_PORT:-5064} -export EPICS_PVA_SERVER_PORT=${EPICS_PVA_SERVER_PORT:-5075} +export CA_SERVER_PORT=${CA_SERVER_PORT:-5064} +export PVA_SERVER_PORT=${PVA_SERVER_PORT:-5075} # DEBUGGING CA_DEBUG=${CA_DEBUG:-0} PVA_DEBUG=${PVA_DEBUG:-0} # background the CA Gateway -/epics/ca-gateway/bin/linux-x86_64/gateway -sport ${EPICS_CA_SERVER_PORT:-5064} -cip "${EPICS_CA_ADDR_LIST}" -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug ${CA_DEBUG:-0} &>/tmp/cagw.log & +/epics/ca-gateway/bin/linux-x86_64/gateway -sport ${CA_SERVER_PORT} -cip "${EPICS_CA_ADDR_LIST}" -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug ${CA_DEBUG:-0} &>/tmp/cagw.log & # fix up the templated pva gateway config cat /config/pvagw.template | sed \ - -e "s/EPICS_PVA_ADDR_LIST/${EPICS_PVA_ADDR_LIST}/" \ - -e "s/EPICS_PVA_SERVER_PORT/${EPICS_PVA_SERVER_PORT}/" \ + -e "s/PVA_ADDR_LIST/${EPICS_PVA_ADDR_LIST}/" \ + -e "s/PVA_SERVER_PORT/${PVA_SERVER_PORT}/" \ > /config/pvagw.config # background the PVA Gateway