Skip to content

Commit

Permalink
Prepared config for serving cernbox web from reva
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Oct 31, 2023
1 parent 942e037 commit 721cde1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
6 changes: 4 additions & 2 deletions examples/cernbox/cernbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ driver = "json"
provider_domain = "{{ vars.provider_domain }}"
webdav_endpoint = "{{ vars.external_reva_endpoint }}"
webdav_prefix = "{{ vars.external_reva_endpoint }}/remote.php/dav/files"
# TODO the following should become {{ vars.external_reva_endpoint }}/external/{{.Token}}/...
webapp_template = "https://your.revad.org/external/sciencemesh/{{.Token}}/{relative-path-to-shared-resource}"
webapp_template = "{{ vars.external_reva_endpoint }}/external/sciencemesh/{{.Token}}/{relative-path-to-shared-resource}"

[grpc.services.ocmshareprovider.drivers.json]
file = "{{ vars.ocmshares_json_file }}"
Expand Down Expand Up @@ -383,5 +382,8 @@ address = ":443"

[http.services.sysinfo]

#[http.services.ui]
#address = ":443"

[http.middlewares.cors]
[http.middlewares.log]
22 changes: 11 additions & 11 deletions examples/cernbox/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ http {
server your.revad.org:443;
}

server
{
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}

# https://ssl-config.mozilla.org/#server=nginx&version=1.20.1&config=intermediate&openssl=1.0.2k&guideline=5.6
server
{
server {
listen 443 ssl http2;
server_name localhost;

Expand All @@ -73,14 +71,12 @@ http {
proxy_buffering off;
proxy_request_buffering off;

location ^~ /data
{
location ^~ /data {
proxy_pass https://revad;
proxy_set_header Host $host;
}

location ~ /s/[^/]*/download
{
location ~ /s/[^/]*/download {
proxy_pass https://revad;
proxy_set_header Host $host;
}
Expand Down Expand Up @@ -130,8 +126,7 @@ http {
proxy_set_header Host $host;
}

location ^~ /status.php
{
location ^~ /status.php {
proxy_pass https://revad;
proxy_set_header Host $host;
}
Expand All @@ -144,7 +139,7 @@ http {
}

location ^~ /cernbox {
root /var/www/;
root /var/www/cernbox;
etag off;
gzip_static on;
}
Expand All @@ -157,5 +152,10 @@ http {
gzip_static on;
try_files $uri /index.html;
}

# location / {
# proxy_pass https://revad/ui;
# proxy_set_header Host $host;
# }
}
}
11 changes: 3 additions & 8 deletions tests/sciencemesh/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ BRANCH_NEXTCLOUD_APP=nextcloud
REPO_OWNCLOUD_APP=https://github.com/sciencemesh/nc-sciencemesh
BRANCH_OWNCLOUD_APP=owncloud

# TODO will be dropped in favour of Reva directly serving the UI
CBOX_WEB=https://github.com/cernbox/web-release/releases/latest/download
# TODO(lopresti) the CERNBox extensions are not released as a 'latest' bundle
# and are for now pushed from a tgz file in this repo
#CBOX_EXT=https://github.com/...

REPO_WOPISERVER=https://github.com/cs3org/wopiserver
TAG_WOPISERVER=master
Expand Down Expand Up @@ -52,19 +50,16 @@ TAG_WOPISERVER=master
mkdir -p temp/cernbox-1-conf temp/cernbox-2-conf && \
cp cernbox/nginx/* temp/cernbox-1-conf && \
cp cernbox/nginx/* temp/cernbox-2-conf && \
mkdir -p ./cernbox-web-sciencemesh/web ./cernbox-web-sciencemesh/cernbox && \
cd cernbox-web-sciencemesh && \
mkdir -p ./web && mkdir -p ./cernbox && \
wget ${CBOX_WEB}/web.tar.gz && \
tar xf web.tar.gz -C ./web --strip-components=1 && \
rm -rf web.tar.gz && \
tar xf ../cernbox/cernbox-extensions-bundle.tgz && \
sed -i "s|\"web-app-draw-io\":\"./web-app-draw-io-.........mjs\",|,|" web/index.html && \
chmod -R 755 ./web ./cernbox && \
chown -R 101:101 ./web/ ./cernbox && \
chmod -R 755 * chown -R 101:101 * && \

Check notice on line 60 in tests/sciencemesh/init.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

tests/sciencemesh/init.sh#L60

Use ./*glob* or -- *glob* so names with dashes won't become options.
cd -

#sed -i "s|WEB_APPS_MAP = {\"web-app-draw-io\":\"./web-app-draw-io-.........mjs\",|WEB_APPS_MAP = {\"web-app-sciencemesh-app\":\".\/web-app-sciencemesh-app-a5ecef59.mjs\",|" web/index.html && \

# wopiserver source code for the config.
[ ! -d "wopi-sciencemesh" ] && \
git clone --branch ${TAG_WOPISERVER} ${REPO_WOPISERVER} wopi-sciencemesh && \
Expand Down

0 comments on commit 721cde1

Please sign in to comment.