From 47226b0d19e82a8de9e51133f44f155c088616d6 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Wed, 16 Jun 2021 13:25:30 +0200 Subject: [PATCH] add config path --- Dockerfile | 2 +- docker_files/init.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 83c7543..6e985a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,5 @@ WORKDIR /config RUN pip3 install --no-cache-dir -r /psa_car_controller/requirements.txt EXPOSE 5000 RUN chmod +x /psa_car_controller/docker_files/init.sh -ENV PSACC_BASE_PATH=/ PSACC_PORT=5000 PSACC_OPTIONS="-c -r -d --web-conf" +ENV PSACC_BASE_PATH=/ PSACC_PORT=5000 PSACC_OPTIONS="-c -r -d --web-conf" PSACC_CONFIG_DIR="/config" CMD /psa_car_controller/docker_files/init.sh diff --git a/docker_files/init.sh b/docker_files/init.sh index 74c6ed5..ec680ac 100644 --- a/docker_files/init.sh +++ b/docker_files/init.sh @@ -1,3 +1,4 @@ #!/bin/bash echo "Containerised psa_car_controller loading..." +cd $PSACC_CONFIG_DIR python3 /psa_car_controller/server.py -p $PSACC_PORT -l 0.0.0.0 -b $PSACC_BASE_PATH $PSACC_OPTIONS