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: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
Note: with this release all the environment variables will be read from the environment, when the service is started, not during build time. Remember to load in your environment all the variables that you need when you start the service in production. This will not affect development setup.
6
6
7
+
* Updated quickstart documenting the changes related to environment variables (\#492).
8
+
* Fixed bug in default dataset selection when job references a deleted dataset (\#492).
7
9
* Fixed v1 workflow task version update bug (\#492).
8
10
* Added `npm pack` artifacts to files published by the CI during the release (\#492).
Versions 18 or 20 of Node.js are recommended (check your version with `node
6
6
-v`). Version 16 is known to work, but not recommended.
@@ -16,6 +16,22 @@ nvm alias default 18
16
16
17
17
## Install fractal-web
18
18
19
+
There are 2 ways to install fractal-web: from release packages (more suited for production and testing) and from git repository (more suited for development).
20
+
21
+
### Install fractal-web from release packages
22
+
23
+
Starting from version 1.1.0, fractal-web releases provide tar.gz files containing the built files for each supported node version. You can install these packages with the following command:
24
+
25
+
```
26
+
FRACTAL_WEB_VERSION=1.1.0 && NODE_MAJOR_VERSION=20 && wget -qO- "https://github.com/fractal-analytics-platform/fractal-web/releases/download/v${FRACTAL_WEB_VERSION}/node-${NODE_MAJOR_VERSION}-fractal-web-v${FRACTAL_WEB_VERSION}.tar.gz" | tar -xz
27
+
```
28
+
29
+
**Note**: this will unpack in the current working directory the file `package.json` and the folders `build` and `node_modules`.
30
+
31
+
To start the application installed in this way see the section "Run fractal-web from the build folder".
(briefly: `.env.development` is the relevant file when using `npm run dev`).
51
+
To properly run fractal-web you have to configure some environment variables. The [environment variables page](./environment-variables.md) contains the complete list of supported environment variables and their default values.
38
52
39
-
Here is an example of a `.env` file:
40
-
```bash
41
-
FRACTAL_SERVER_HOST=http://localhost:8000
53
+
If you want to run the application executing `node` in the `build` folder you have to export the environment variables in your shell. See the section "Run fractal-web from the build folder" for more details.
42
54
43
-
# AUTH COOKIE
44
-
AUTH_COOKIE_NAME=fastapiusersauth
45
-
AUTH_COOKIE_SECURE=false
46
-
# remember to set this in production
47
-
AUTH_COOKIE_DOMAIN=
48
-
AUTH_COOKIE_PATH=/
49
-
AUTH_COOKIE_MAX_AGE=1800
50
-
AUTH_COOKIE_SAME_SITE=lax
51
-
AUTH_COOKIE_HTTP_ONLY=true
52
-
53
-
# PUBLIC VARIABLES (accessible from client side)
54
-
PUBLIC_FRACTAL_ADMIN_SUPPORT_EMAIL=help@localhost
55
-
PUBLIC_UPDATE_JOBS_INTERVAL=3000
56
-
PUBLIC_OAUTH_CLIENT_NAME=
57
-
58
-
# Logging configuration (used in Svelte backend)
59
-
LOG_FILE=/tmp/fractal-web.log
60
-
LOG_LEVEL_FILE=info
61
-
LOG_LEVEL_CONSOLE=warn
62
-
```
55
+
When running the application from the git repository, environment variables are set either in `.env` or `.env.development` files, see
(briefly: `.env.development` is the relevant file when using `npm run dev` and `.env` is the relevant file when using `npm run preview`).
63
58
64
59
You can also add your customizations in a file named `.env.local` or `.env.development.local` to avoid writing on env files that are under version control.
65
60
66
-
## Web client startup
67
-
68
-
For testing and production, start fractal-web executing
69
-
```
70
-
npm run build # corresponding to `vite build`, which creates a `build` folder
71
-
ORIGIN=http://localhost:5173 PORT=5173 node build
72
-
```
61
+
### Common issues related to environment variables
73
62
74
-
The application is now running at `http://localhost:5173`.
63
+
The `node` command relies on some extra environment variables, and especially on `ORIGIN`:
75
64
76
-
Note that the `node` command relies on some environment variables, and
77
-
especially on `ORIGIN`:
78
65
> HTTP doesn't give SvelteKit a reliable way to know the URL that is currently
79
66
> being requested. The simplest way to tell SvelteKit where the app is being
80
67
> served is to set the `ORIGIN` environment variable
81
68
> (see [SvelteKit node servers documentation](https://kit.svelte.dev/docs/adapter-node#environment-variables-origin-protocolheader-hostheader-and-port-header)).
82
69
> A wrong origin value will result in the error message "Cross-site POST form submissions are forbidden".
83
70
84
-
For development, run the client application via
85
-
```bash
86
-
npm run dev
87
-
```
71
+
Unexpected behaviors can be related to wrong values of the `AUTH_COOKIE_DOMAIN` variable:
88
72
89
73
> A typical gotcha: if there is a mismatch between the cookie domain and the
90
74
> URL you are using (e.g. one points to localhost and the other one to
@@ -94,3 +78,64 @@ npm run dev
94
78
> inferred from the HTTP call. This is useful to avoid domain mismatch issues
95
79
> during testing and development, but in production is suggested to set it as
96
80
> the name of the domain where the fractal-web server is running.
81
+
82
+
## Run fractal-web from the build folder
83
+
84
+
You can create a script with the following content to run fractal-web installed from a release package:
0 commit comments