Prepare the repository for having a separate calculator app.

This commit is contained in:
Phil Elson 2020-11-03 12:38:38 +01:00
parent d44ae5501f
commit ffa2e53994
8 changed files with 14 additions and 2 deletions

View file

@ -2,8 +2,6 @@ version: "3.8"
services:
cara-app:
image: cara-voila-app
# ports:
# - "8080:8081"
links:
- cara-router
cara-router:

View file

@ -0,0 +1 @@
Page not found!

View file

@ -0,0 +1 @@
../../cara/apps/calculator/static

View file

@ -46,6 +46,8 @@ http {
}
location /voila-server/ {
# cara-app is the name of the voila server in each of docker-compose,
# test-cara.web.cern.ch and cara.web.cern.ch.
proxy_pass http://cara-app:8080/voila-server/;
proxy_set_header Host $host;
@ -58,6 +60,12 @@ http {
proxy_read_timeout 86400;
}
rewrite ^/expert-app$ /voila-server/voila/render/cara.ipynb last;
# Give the static content of the calculator app a sensible name which is
# consistent with the static directory of the calculator webserver used
# for development.
rewrite ^/calculator/static/(.*)$ /calculator-static/$1 last;
# Before implementing the nginx router we could access /voila/render/cara.ipynb.
# Redirect this (and all other) URLs to the new scheme.
rewrite ^/voila/(.*)$ /voila-server/voila/$1 redirect;

4
cara/apps/__init__.py Normal file
View file

@ -0,0 +1,4 @@
from .expert import ExpertApplication
__all__ = ['ExpertApplication']

View file

View file