diff --git a/dockerfile b/dockerfile index 1fc6c5a35a2da1a03ad0b4b489b3e844c8148dae..e157f0ea4aec92c78bd54a91cf48d9c5b06aeb2e 100644 --- a/dockerfile +++ b/dockerfile @@ -3,15 +3,13 @@ FROM python:3.11 # WORKDIR /usr/src/app ENV GIT_SSL_NO_VERIFY=1 # Install net-tools for ifconfig -RUN apt-get update && \ - apt-get install -y net-tools && \ - rm -rf /var/lib/apt/lists/* + # Install any needed packages specified in requirements.txt RUN git clone https://gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend.git RUN pip install --no-cache-dir -r dsi-parser-frontend/requirements.txt EXPOSE 5020 -CMD ["dsi-parser-frontend/startkBokehAndPrintIp.sh"] -#CMD ["bokeh", "serve", "dsi-parser-frontend/", "--port", "5020", "--allow-websocket-origin", "*","--use-xheaders","--prefix","dsi-parser-frontend"] + +CMD ["bokeh", "serve", "dsi-parser-frontend/", "--port", "5020", "--allow-websocket-origin", "*","--use-xheaders","--prefix","dsi-parser-frontend"] diff --git a/startkBokehAndPrintIp.sh b/startkBokehAndPrintIp.sh deleted file mode 100755 index f7193d6780853e0220463fabe1ba133ede67eaff..0000000000000000000000000000000000000000 --- a/startkBokehAndPrintIp.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -#!/bin/bash - -# Function to print IP addresses using ip command -function print_ips_with_ip() { - echo "IP addresses on this machine:" - ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' -} - -# Function to print IP addresses using ifconfig command -function print_ips_with_ifconfig() { - echo "IP addresses on this machine:" - ifconfig | grep -o 'inet addr:\S*' | cut -d':' -f2 -} - -# Check if ip command is available and use it, otherwise try ifconfig -if command -v ip >/dev/null 2>&1; then - print_ips_with_ip -elif command -v ifconfig >/dev/null 2>&1; then - print_ips_with_ifconfig -else - echo "No tool available to find IP addresses." -fi - -# Define the initial Bokeh server command -CMD=("bokeh" "serve" "dsi-parser-frontend/" "--port" "5020" "--allow-websocket-origin" "*" "--use-xheaders" "--prefix" "dsi-parser-frontend") - -# Execute the command -"${CMD[@]}" -EXIT_STATUS=$? - -# Check if the command failed -if [ $EXIT_STATUS -ne 0 ]; then - echo "Initial Bokeh server command failed. Attempting fallback command..." - # Define and execute the fallback Bokeh server command - CMD=("bokeh" "serve" "./" "--port" "5020" "--allow-websocket-origin" "*" "--use-xheaders" "--prefix" "dsi-parser-frontend") - "${CMD[@]}" -fi \ No newline at end of file