You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-20Lines changed: 29 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ The application has 3 endpoints:
8
8
9
9
- the endpoint `/files/{path-to-zarr}`, that serves the content of Zarr files checking user authorization.
10
10
- the endpoint `/alive`, that returns the status of the service.
11
-
- the optional endpoint `/vizarr`, that serves vizarr static files when the `VIZARR_STATIC_FILES_PATH` environment variable is set.
11
+
- the optional endpoint `/viewer`, that serves [BioNGFF Viewer](https://github.com/BioNGFF/biongff-viewer)static files when the `VIEWER_STATIC_FILES_PATH` environment variable is set.
12
12
13
-
> To run fractal-data you need to have an active instance of `fractal-server` and an active instance of `fractal-web`. You need to log-in to `fractal-web` from the browser using a user that has been authorized to see the vizarr files. Details about authorization are explained in the next section.
13
+
> To run fractal-data you need to have an active instance of `fractal-server` and an active instance of `fractal-web`. You need to log-in to `fractal-web` from the browser using a user that has been authorized to see the viewer files. Details about authorization are explained in the next section.
14
14
15
15
## How it works
16
16
@@ -36,25 +36,25 @@ If different subdomains are used for fractal-web and fractal-data, the fractal-w
36
36
37
37
Example: if fractal-data is served on `fractal-data.mydomain.net` and fractal-web is served on `fractal-web.mydomain.net`, then `AUTH_COOKIE_DOMAIN` must be set to `mydomain.net`.
38
38
39
-
If we need to serve these services on different domains a different authentication strategy has to be chosen, for example something token-based. That results in a more complicated setup, possibly involving some extra changes on the vizarr code.
39
+
If we need to serve these services on different domains a different authentication strategy has to be chosen, for example something token-based. That results in a more complicated setup, possibly involving some extra changes on the viewer code.
40
40
41
41
## Install fractal-data from release packages
42
42
43
-
The release packages include the Node.js server and the Vizarr static files. Starting from version 0.1.3, fractal-data releases provide tar.gz files containing built Vizarr static files and a package of built files for each supported node version.
43
+
The release packages include the Node.js server and the BioNGFF Viewer static files. Starting from version 0.1.3, fractal-data releases provide tar.gz files containing built BioNGFF Viewer static files and a package of built files for each supported node version.
44
44
45
-
### Install Vizarr static files
45
+
### Install BioNGFF Viewer static files
46
46
47
-
Vizarr static files can be served using any server like Apache or Ngnix.
47
+
BioNGFF Viewer static files can be served using any server like Apache or Ngnix.
48
48
49
-
Create a dedicated folder for vizarr on your server. For Apache, it could be `/var/www/html/vizarr`.
49
+
Create a dedicated folder for the viewer on your server. For Apache, it could be `/var/www/html/viewer`.
50
50
51
-
Navigate to the directory and extract the Vizarr static files:
51
+
Navigate to the directory and extract the BioNGFF Viewer static files:
52
52
53
53
```
54
-
FRACTAL_DATA_VERSION=0.4.0 && wget -qO- "https://github.com/fractal-analytics-platform/fractal-data/releases/download/v${FRACTAL_DATA_VERSION}/fractal-vizarr-v${FRACTAL_DATA_VERSION}.tar.gz" | tar -xz
54
+
FRACTAL_DATA_VERSION=0.4.0 && wget -qO- "https://github.com/fractal-analytics-platform/fractal-data/releases/download/v${FRACTAL_DATA_VERSION}/fractal-viewer-v${FRACTAL_DATA_VERSION}.tar.gz" | tar -xz
55
55
```
56
56
57
-
**Note**: this will unpack in the current working directory the vizarr`dist` folder.
57
+
**Note**: this will unpack in the current working directory the viewer`dist` folder.
58
58
59
59
### Install fractal-data Node.js server files
60
60
@@ -73,7 +73,7 @@ To start the application installed in this way see the section [Run fractal-data
73
73
-`PORT`: the port where fractal-data app is served;
74
74
-`BIND_ADDRESS`: specifies the IP address for the server to bind to; use `0.0.0.0` (IPv4) or `::` (IPv6) to listen on all interfaces, `127.0.0.1` (IPv4) or `::1` (IPv6) for localhost only; the default value is `0.0.0.0`;
75
75
-`FRACTAL_SERVER_URL`: the base URL of fractal-server;
76
-
-`VIZARR_STATIC_FILES_PATH`: path to the files generated running `npm run build` in Vizarr source folder; this variable is optional and, if present, it will be used to serve Vizarr static files from the `/vizarr` endpoint;
76
+
-`VIEWER_STATIC_FILES_PATH`: path to the files generated by building the BioNGFF Viewer; this variable is optional and, if present, it will be used to serve the BioNGFF Viewer static files from the `/viewer` endpoint;
77
77
-`BASE_PATH`: base path of fractal-data application;
78
78
-`AUTHORIZATION_SCHEME`: defines how the service verifies user authorization. The following options are available:
79
79
-`fractal-server`: the paths that can be accessed by each user are retrieved calling fractal-server API.
@@ -189,25 +189,34 @@ npm install
189
189
190
190
Copy the file `.env.example` to `.env` and customize values for the environment variables.
191
191
192
-
### Vizarr setup
192
+
### BioNGFF Viewer setup
193
193
194
-
In order to display a proper error message related to the missing authorization it is necessary to use a modified version of vizarr.
194
+
BioNGFF Viewer depends on Vizarr and we are using a custom fork of Vizarr, to fix some issues. The .gitmodules file of the BioNGFF Viewer needs to be changed to reference our Vizarr fork.
195
195
196
-
> Note: for simplicity, we assume that `fractal-data` and `vizarr` are subfolders of the same folder:
196
+
> Note: for simplicity, we assume that `fractal-data` and `biongff-viewer` are subfolders of the same folder:
npx pnpm --filter app run build --base /data/viewer
204
213
```
205
214
206
-
The output is located in the `dist` folder.
215
+
The output is located in the `sites/app/dist` folder.
207
216
208
217
### Run fractal-data
209
218
210
-
Then go back to fractal-data folder and run `npm run start` to start the project. The server will start on port 3000. Remember to set the `VIZARR_STATIC_FILES_PATH`, to serve Vizarr static files from the `/vizarr` endpoint. Vizarr static files need to be served from the same port and domain of the fractal-data service, otherwise you will encounter CORS issues.
219
+
Then go back to fractal-data folder and run `npm run start` to start the project. The server will start on port 3000. Remember to set the `VIEWER_STATIC_FILES_PATH`, to serve BioNGFF Viewer static files from the `/viewer` endpoint. BioNGFF Viewer static files need to be served from the same port and domain of the fractal-data service, otherwise you will encounter CORS issues.
0 commit comments