updated docker files for expert app

This commit is contained in:
Luis Aleixo 2023-02-23 10:46:03 +01:00
parent 4a965edde6
commit b791581fe8
4 changed files with 18 additions and 0 deletions

View file

@ -15,6 +15,7 @@ COPY ./app-config/caimira-public-docker-image/run_caimira.sh /opt/caimira/start.
# In the best case this will be a no-op. # In the best case this will be a no-op.
RUN cd /opt/caimira/src/ && /opt/caimira/app/bin/pip install -r /opt/caimira/src/requirements.txt RUN cd /opt/caimira/src/ && /opt/caimira/app/bin/pip install -r /opt/caimira/src/requirements.txt
RUN /opt/caimira/app/bin/jupyter trust /opt/caimira/src/caimira/apps/expert/*.ipynb RUN /opt/caimira/app/bin/jupyter trust /opt/caimira/src/caimira/apps/expert/*.ipynb
RUN /opt/caimira/app/bin/jupyter trust /opt/caimira/src/caimira/apps/simulator/*.ipynb
COPY ./app-config/caimira-public-docker-image/nginx.conf /opt/caimira/nginx.conf COPY ./app-config/caimira-public-docker-image/nginx.conf /opt/caimira/nginx.conf
EXPOSE 8080 EXPOSE 8080

View file

@ -50,6 +50,12 @@ http {
rewrite ^/expert-app$ /voila-server/ last; rewrite ^/expert-app$ /voila-server/ last;
rewrite ^/(files/static)/(.*)$ /voila-server/voila/$1/$2 last; rewrite ^/(files/static)/(.*)$ /voila-server/voila/$1/$2 last;
location /CO2-voila-server/ {
proxy_pass http://localhost:8082/CO2-voila-server/;
}
rewrite ^/CO2-app$ /voila-server/ last;
rewrite ^/(files/static)/(.*)$ /voila-server/voila/$1/$2 last;
location / { location / {
proxy_pass http://localhost:8081; proxy_pass http://localhost:8081;
} }

View file

@ -26,6 +26,9 @@ if [[ "$APP_NAME" == "caimira-webservice" ]]; then
elif [[ "$APP_NAME" == "caimira-voila" ]]; then elif [[ "$APP_NAME" == "caimira-voila" ]]; then
echo "Starting the voila service" echo "Starting the voila service"
voila caimira/apps/expert/ --port=8080 --no-browser --base_url=/voila-server/ --tornado_settings 'allow_origin=*' voila caimira/apps/expert/ --port=8080 --no-browser --base_url=/voila-server/ --tornado_settings 'allow_origin=*'
elif [[ "$APP_NAME" == "caimira-CO2-voila" ]]; then
echo "Starting the voila service"
voila caimira/apps/simulator/ --port=8080 --no-browser --base_url=/CO2-voila-server/ --tornado_settings 'allow_origin=*'
else else
echo "No APP_NAME specified" echo "No APP_NAME specified"
exit 1 exit 1

View file

@ -6,6 +6,12 @@ services:
- APP_NAME=caimira-voila - APP_NAME=caimira-voila
user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"} user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"}
caimira-CO2-app:
image: caimira-webservice
environment:
- APP_NAME=caimira-CO2-voila
user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"}
caimira-webservice: caimira-webservice:
image: caimira-webservice image: caimira-webservice
environment: environment:
@ -46,6 +52,8 @@ services:
condition: service_started condition: service_started
caimira-app: caimira-app:
condition: service_started condition: service_started
caimira-CO2-app:
condition: service_started
auth-service: auth-service:
condition: service_started condition: service_started
user: ${CURRENT_UID} user: ${CURRENT_UID}