diff --git a/app-config/docker-compose.yml b/app-config/docker-compose.yml index 675b6829..917660ea 100644 --- a/app-config/docker-compose.yml +++ b/app-config/docker-compose.yml @@ -2,8 +2,6 @@ version: "3.8" services: cara-app: image: cara-voila-app - # ports: - # - "8080:8081" links: - cara-router cara-router: diff --git a/app-config/nginx/404.html b/app-config/nginx/404.html new file mode 100644 index 00000000..2000eebc --- /dev/null +++ b/app-config/nginx/404.html @@ -0,0 +1 @@ +Page not found! diff --git a/app-config/nginx/calculator-static b/app-config/nginx/calculator-static new file mode 120000 index 00000000..5605de12 --- /dev/null +++ b/app-config/nginx/calculator-static @@ -0,0 +1 @@ +../../cara/apps/calculator/static \ No newline at end of file diff --git a/app-config/nginx/nginx.conf b/app-config/nginx/nginx.conf index 660f5616..b32341d5 100644 --- a/app-config/nginx/nginx.conf +++ b/app-config/nginx/nginx.conf @@ -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; diff --git a/cara/apps/__init__.py b/cara/apps/__init__.py new file mode 100644 index 00000000..da903ca1 --- /dev/null +++ b/cara/apps/__init__.py @@ -0,0 +1,4 @@ +from .expert import ExpertApplication + + +__all__ = ['ExpertApplication'] diff --git a/cara/apps/calculator/__init__.py b/cara/apps/calculator/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cara/apps/calculator/static/form.html b/cara/apps/calculator/static/form.html new file mode 100644 index 00000000..e69de29b diff --git a/cara/apps.py b/cara/apps/expert.py similarity index 100% rename from cara/apps.py rename to cara/apps/expert.py