Skip to content
Snippets Groups Projects
Commit 5a95ebd7 authored by Benedikt's avatar Benedikt
Browse files

fixed #3 adding node js to docker file

parent 8ba21ab2
No related branches found
No related tags found
No related merge requests found
FROM python:3.10
ENV GIT_SSL_NO_VERIFY=1
# Set the environment variable for the HTTP proxy
#ENV http_proxy="http://webproxy.bs.ptb.de:8080"
#ENV https_proxy="http://webproxy.bs.ptb.de:8080"
# Set the environment variable for the NO_PROXY
# This ensures that the proxy is not used for ptb.de
#ENV no_proxy="ptb.de"
# Install NodeJS
RUN apt-get update && apt-get install -y nodejs npm
# Set the working directory
WORKDIR /app
# Clone your repository
RUN git clone https://gitlab1.ptb.de/digitaldynamicmeasurement/dcc_XMLJSONConvGUI.git
#RUN pip install --no-cache-dir --upgrade --proxy http://webproxy.bs.ptb.de:8080 -r ./dcc_XMLJSONConvGUI/requirements.txt
RUN pip install --no-cache-dir --upgrade -r ./dcc_XMLJSONConvGUI/requirements.txt
#RUN pip install --proxy http://192.53.103.119:8080 --no-cache-dir --upgrade -r /code/requirements.txt
#
# Change to the project directory
WORKDIR /app/dcc_XMLJSONConvGUI
EXPOSE 8000
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Install NodeJS dependencies and compile TypeScript
WORKDIR /app/dcc_XMLJSONConvGUI/custom_bokeh_widgets
RUN npm install
RUN npm run build
# Expose necessary ports
EXPOSE 5009
EXPOSE 5008
#
RUN chmod +x dcc_XMLJSONConvGUI/start_servers.sh
RUN chmod +x dcc_XMLJSONConvGUI/dcc_XMLJSONConvGUI.py
CMD ["./dcc_XMLJSONConvGUI/start_servers.sh"]
#CMD ["uvicorn", "dcc_server:app", "--host", "0.0.0.0", "--port", "8000", "--root-path", "/dcc_rest_server"]
#CMD ["bokeh", "serve","--show","dcc_XMLJSONConvGUI.py", "--allow-websocket-origin","*","--port","5010"]
# Make the script executable
RUN chmod +x /app/dcc_XMLJSONConvGUI/start_servers.sh
RUN chmod +x /app/dcc_XMLJSONConvGUI/dcc_XMLJSONConvGUI.py
# Start the servers
CMD ["./start_servers.sh"]t
\ No newline at end of file
#!/bin/bash
cd /dcc_XMLJSONConvGUI
uvicorn dcc_server:app --host 0.0.0.0 --port 8000 --root-path /dcc_rest_server &
uvicorn dcc_server:app --host 0.0.0.0 --port 5009 --root-path /dcc_rest_server &
python3 dcc_XMLJSONConvGUI.py --allow-websocket-origin "*" --port 5008
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment