used lower case for CO2 app
This commit is contained in:
parent
22f12f67b0
commit
1770c31977
6 changed files with 72 additions and 15 deletions
|
|
@ -50,10 +50,10 @@ http {
|
|||
rewrite ^/expert-app$ /voila-server/ last;
|
||||
rewrite ^/(files/static)/(.*)$ /voila-server/voila/$1/$2 last;
|
||||
|
||||
location /CO2-voila-server/ {
|
||||
proxy_pass http://localhost:8082/CO2-voila-server/;
|
||||
location /co2-voila-server/ {
|
||||
proxy_pass http://localhost:8082/co2-voila-server/;
|
||||
}
|
||||
rewrite ^/CO2-app$ /voila-server/ last;
|
||||
rewrite ^/co2-app$ /voila-server/ last;
|
||||
rewrite ^/(files/static)/(.*)$ /voila-server/voila/$1/$2 last;
|
||||
|
||||
location / {
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ if [[ "$APP_NAME" == "caimira-webservice" ]]; then
|
|||
elif [[ "$APP_NAME" == "caimira-voila" ]]; then
|
||||
echo "Starting the voila service"
|
||||
voila caimira/apps/expert/ --port=8080 --no-browser --base_url=/voila-server/ --tornado_settings 'allow_origin=*'
|
||||
elif [[ "$APP_NAME" == "caimira-CO2-voila" ]]; then
|
||||
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=*'
|
||||
voila caimira/apps/simulator/ --port=8080 --no-browser --base_url=/co2-voila-server/ --tornado_settings 'allow_origin=*'
|
||||
else
|
||||
echo "No APP_NAME specified"
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ services:
|
|||
- APP_NAME=caimira-voila
|
||||
user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"}
|
||||
|
||||
caimira-CO2-app:
|
||||
caimira-co2-app:
|
||||
image: caimira-webservice
|
||||
environment:
|
||||
- APP_NAME=caimira-CO2-voila
|
||||
- APP_NAME=caimira-co2-voila
|
||||
user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"}
|
||||
|
||||
caimira-webservice:
|
||||
|
|
@ -52,7 +52,7 @@ services:
|
|||
condition: service_started
|
||||
caimira-app:
|
||||
condition: service_started
|
||||
caimira-CO2-app:
|
||||
caimira-co2-app:
|
||||
condition: service_started
|
||||
auth-service:
|
||||
condition: service_started
|
||||
|
|
|
|||
|
|
@ -93,24 +93,24 @@ http {
|
|||
absolute_redirect off;
|
||||
rewrite ^/voila/(.*)$ /voila-server/voila/$1 redirect;
|
||||
|
||||
location /CO2-voila-server/ {
|
||||
location /co2-voila-server/ {
|
||||
proxy_intercept_errors on;
|
||||
|
||||
# Anything under voila-server or CO2-app is authenticated.
|
||||
# Anything under voila-server or co2-app is authenticated.
|
||||
auth_request /auth/probe;
|
||||
error_page 401 = @error401;
|
||||
error_page 404 = @proxy_404_error_handler;
|
||||
|
||||
# caimira-co2-app is the name of the voila server in each of docker-compose,
|
||||
# caimira-test.web.cern.ch and caimira.web.cern.ch.
|
||||
proxy_pass http://caimira-co2-app:8080/CO2-voila-server/;
|
||||
proxy_pass http://caimira-co2-app:8080/co2-voila-server/;
|
||||
}
|
||||
rewrite ^/CO2-app$ /CO2-voila-server/voila/render/caimira.ipynb last;
|
||||
rewrite ^/(files/static)/(.*)$ /CO2-voila-server/voila/$1/$2 last;
|
||||
rewrite ^/co2-app$ /co2-voila-server/voila/render/caimira.ipynb last;
|
||||
rewrite ^/(files/static)/(.*)$ /co2-voila-server/voila/$1/$2 last;
|
||||
|
||||
# Before implementing the nginx router we could access /voila/render/caimira.ipynb.
|
||||
# Redirect this (and all other) URLs to the new scheme.
|
||||
rewrite ^/voila/(.*)$ /CO2-voila-server/voila/$1 redirect;
|
||||
rewrite ^/voila/(.*)$ /co2-voila-server/voila/$1 redirect;
|
||||
|
||||
location / {
|
||||
# By default we have no authentication.
|
||||
|
|
|
|||
|
|
@ -125,6 +125,63 @@
|
|||
kind: ImageStreamTag
|
||||
name: 'caimira-webservice:latest'
|
||||
namespace: ${PROJECT_NAME}
|
||||
-
|
||||
apiVersion: apps.openshift.io/v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
name: caimira-co2-app
|
||||
labels: {app: caimira-co2-app}
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: caimira-co2-app
|
||||
spec:
|
||||
containers:
|
||||
- name: caimira-webservice
|
||||
env:
|
||||
- name: APP_NAME
|
||||
value: caimira-co2-voila
|
||||
image: '${PROJECT_NAME}/caimira-webservice'
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
limits: { cpu: '1', memory: 1Gi }
|
||||
requests: { cpu: 1m, memory: 512Mi }
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext: { }
|
||||
terminationGracePeriodSeconds: 30
|
||||
strategy:
|
||||
activeDeadlineSeconds: 21600
|
||||
resources: { }
|
||||
rollingParams:
|
||||
intervalSeconds: 1
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
timeoutSeconds: 600
|
||||
updatePeriodSeconds: 1
|
||||
type: Rolling
|
||||
test: false
|
||||
selector:
|
||||
app: caimira-co2-app
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- caimira-webservice
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: 'caimira-webservice:latest'
|
||||
namespace: ${PROJECT_NAME}
|
||||
-
|
||||
apiVersion: apps.openshift.io/v1
|
||||
kind: DeploymentConfig
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<li><a href="{{ get_calculator_url() }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">Calculator</a></li>
|
||||
<li><div class="d-flex"><span class="d-flex align-self-center submenu-division"></span><a href="{{ get_calculator_url() }}/user-guide" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">User Guide</a></div></li>
|
||||
<li><a href="/expert-app" class="{{ "header-navbar nav-link active" if "/expert-app" == active_page else "header-navbar nav-link" }}">Expert app (beta)</a></li>
|
||||
<li><a href="/CO2-app" class="{{ "header-navbar nav-link active" if "/CO2-app" == active_page else "header-navbar nav-link" }}">CO₂ Simulator</a></li>
|
||||
<li><a href="/co2-app" class="{{ "header-navbar nav-link active" if "/co2-app" == active_page else "header-navbar nav-link" }}">CO₂ Simulator</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue