From e35914b4a7d8106638f8523b82065216388196c0 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand <benjamin.bertrand@esss.se> Date: Wed, 24 Apr 2019 18:33:53 +0200 Subject: [PATCH] Move environment variables outside Python script Environment variables should be set in the docker-compose.yml file. --- Python server/pos-python-server.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Python server/pos-python-server.py b/Python server/pos-python-server.py index b18c605..68eccc2 100755 --- a/Python server/pos-python-server.py +++ b/Python server/pos-python-server.py @@ -13,12 +13,9 @@ from epicsarchiver import ArchiverAppliance from threading import Thread, Event PORT_NUMBER = 8080 -EPICS_SERVER = '10.0.16.88' -os.environ['EPICS_CA_ADDR_LIST'] = EPICS_SERVER -os.environ['EPICS_CA_AUTO_ADDR_LIST'] = 'NO' -ARCHIVER_SERVER = 'archiver-01.tn.esss.lu.se' +ARCHIVER_SERVER = os.environ.get('ARCHIVER_SERVER', 'archiver-01.tn.esss.lu.se') archiver = ArchiverAppliance(ARCHIVER_SERVER) -pv_repo='https://bitbucket.org/europeanspallationsource/isrc-lebt-pv-list.git' +pv_repo = os.environ.get('PV_REPO', 'https://bitbucket.org/europeanspallationsource/isrc-lebt-pv-list.git') stop_signal = Event() stop_signal.clear() -- GitLab