Skip to content

Commit 5942a2b

Browse files
committed
Add example 3 of configuration
1 parent 1d52a98 commit 5942a2b

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
`.fractal_server.env` file
3+
```bash
4+
DEPLOYMENT_TYPE=testing
5+
JWT_SECRET_KEY=XXX
6+
JWT_EXPIRE_SECONDS=80000
7+
DB_ENGINE=postgres
8+
POSTGRES_USER=XXX
9+
POSTGRES_HOST=XXX
10+
POSTGRES_DB=XXX
11+
FRACTAL_TASKS_DIR=/some/folder
12+
FRACTAL_LOGGING_LEVEL=20
13+
FRACTAL_RUNNER_BACKEND=slurm
14+
FRACTAL_RUNNER_WORKING_BASE_DIR=/some/other/folder
15+
FRACTAL_SLURM_CONFIG_FILE=/some/file.json
16+
FRACTAL_ADMIN_DEFAULT_EMAIL=XXX
17+
FRACTAL_ADMIN_DEFAULT_PASSWORD=XXX
18+
```
19+
20+
Startup command:
21+
```bash
22+
gunicorn fractal_server.main:app --workers 8 --worker-class uvicorn.workers.UvicornWorker --bind $DOMAIN:$FRACTAL_SERVER_PORT --access-logfile server_logs/fractal-server.out --error-logfile server_logs/fractal-server.err
23+
```
24+
where for instance `DOMAIN=my.domain.ch` and `FRACTAL_SERVER_PORT=8000`.
25+
26+
Alternative startup command:
27+
```bash
28+
fractalctl start --host $DOMAIN --port $FRACTAL_SERVER_PORT
29+
```
30+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
Notes:
3+
* `DOMAIN=my.domain.ch` (for instance)
4+
* `FRACTAL_SERVER_PORT=8000` (for instance) is the fractal-server port
5+
* `FRACTAL_WEB_PORT=5173` (for instance) is the fractal-web port (exposed via apache)
6+
7+
1. `.env` file (replace as appropriate):
8+
```bash
9+
FRACTAL_SERVER_HOST=http://$DOMAIN:$FRACTAL_SERVER_PORT
10+
# AUTH COOKIE
11+
AUTH_COOKIE_NAME=fastapiusersauth
12+
AUTH_COOKIE_SECURE=false
13+
AUTH_COOKIE_DOMAIN=$DOMAIN
14+
AUTH_COOKIE_PATH=/
15+
AUTH_COOKIE_MAX_AGE=1800
16+
AUTH_COOKIE_SAME_SITE=lax
17+
AUTH_COOKIE_HTTP_ONLY=true
18+
```
19+
20+
2. Build via
21+
```bash
22+
npm run build
23+
```
24+
25+
3. Run via
26+
```
27+
PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host ORIGIN=https://$DOMAIN PORT=$FRACTAL_WEB_PORT node build

0 commit comments

Comments
 (0)