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
Update Master Branch with Development Changes (#45)
* updating docker compose to use nginx for forwarding
* added nginx config and updated docker file works on mac
* added folder for certs
* had to bodge npm installs, husky, and vite to get healthy containers on osx
* updated docker compose, health checks all pass. CORS still an issue
* add nginx config
* incremental progress is progress
* redirects all work when running locally
* ssl works with the addition of a cert, key, and the password for it
* create standalone production config
* consolidating variables and options into 1 launch script and 1 .env file
* updated lint check to use prettier instead of npm 'style-check' and 'lint-check'
* update package-lock.json
* bringing more in line with buti1021's PR, while 'stream-lining' env and entrypoints
* update docker ignore and build
* works well enough in production, 'dev' could still use some tweaks
* what changes?
* Apply suggestions from code review
update nginx.conf
* got local running again by ditching nginx
* remove nginx_var
* Update example.env
* remove last dev nginx bits
* certs and keys path as environment
* enable telemetry via build in compose_profile env var
* revert vite config changes
* Nru self signed (#29)
* added setup script, removed password for ssl certs
* updated handler and setup.sh
* added acquisition date and time fields to intermediate sidecar files
and scrub those same dates from BIDS Finalized output sidecars
* added instructions in launch.sh
* Nru self signed (#31)
* added setup script, removed password requirment for ssl certs
* updated handler and setup.sh
* added acquisiiton date and time fields
* scrub dates from BIDS Finalized output
* added instructions in launch.sh
* fix compose that got bungled during merge.
* Update handler/Dockerfile
* Merge Apptainer Into Development Branch (#34)
* Updating bendhouseart/ezbids:master from buti1021/ezbids:add-nginx-forwarding (#1)
* updating docker compose to use nginx for forwarding
* added nginx config and updated docker file works on mac
* added folder for certs
* had to bodge npm installs, husky, and vite to get healthy containers on osx
* updated docker compose, health checks all pass. CORS still an issue
* add nginx config
* ssl works with the addition of a cert, key, and the password for it
* create standalone production config
* consolidating variables and options into 1 launch script and 1 .env file
* updated lint check to use prettier instead of npm 'style-check' and 'lint-check'
* update package-lock.json
* bringing more in line with buti1021's PR, while 'stream-lining' env and entrypoints
* update docker ignore and build
* Update example.env
* certs and keys path as environment
* enable telemetry via build in compose_profile env var
* revert vite config changes
* remove old files
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
* Create dependabot.yml
* Adding apptainer support (#28)
* Added .gitignore and README
* Updated README for formatting
* Adding apptainer scripts
---------
Co-authored-by: Marc Cummings <[email protected]>
* Updated .gitignore, added build script
* Update nginx/production_nginx.conf
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
* added argument for using IP or custom host name in self signed
* updated self signed script to accept IP address or hostname as argument
* Auto index sessions by date (#37)
* update handler dockerfile
* testing inspection and moving of dicoms
* rename and update sort
* sorts PET dicom files into sub/ses folders then converts
* presort all dicoms into subject/session folders if env var is present (#38)
* Apptainer (#39)
* Updating bendhouseart/ezbids:master from buti1021/ezbids:add-nginx-forwarding (#1)
* updating docker compose to use nginx for forwarding
* added nginx config and updated docker file works on mac
* added folder for certs
* had to bodge npm installs, husky, and vite to get healthy containers on osx
* updated docker compose, health checks all pass. CORS still an issue
* add nginx config
* ssl works with the addition of a cert, key, and the password for it
* create standalone production config
* consolidating variables and options into 1 launch script and 1 .env file
* updated lint check to use prettier instead of npm 'style-check' and 'lint-check'
* update package-lock.json
* bringing more in line with buti1021's PR, while 'stream-lining' env and entrypoints
* update docker ignore and build
* Update example.env
* certs and keys path as environment
* enable telemetry via build in compose_profile env var
* revert vite config changes
* remove old files
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
* Create dependabot.yml
* Adding apptainer support (#28)
* Added .gitignore and README
* Updated README for formatting
* Adding apptainer scripts
---------
Co-authored-by: Marc Cummings <[email protected]>
* Updated .gitignore, added build script
* Update nginx/production_nginx.conf
* Delete .github/dependabot.yml
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
* Apptainer (#40)
* Updating bendhouseart/ezbids:master from buti1021/ezbids:add-nginx-forwarding (#1)
* updating docker compose to use nginx for forwarding
* added nginx config and updated docker file works on mac
* added folder for certs
* had to bodge npm installs, husky, and vite to get healthy containers on osx
* updated docker compose, health checks all pass. CORS still an issue
* add nginx config
* ssl works with the addition of a cert, key, and the password for it
* create standalone production config
* consolidating variables and options into 1 launch script and 1 .env file
* updated lint check to use prettier instead of npm 'style-check' and 'lint-check'
* update package-lock.json
* bringing more in line with buti1021's PR, while 'stream-lining' env and entrypoints
* update docker ignore and build
* Update example.env
* certs and keys path as environment
* enable telemetry via build in compose_profile env var
* revert vite config changes
* remove old files
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
* Create dependabot.yml
* Adding apptainer support (#28)
* Added .gitignore and README
* Updated README for formatting
* Adding apptainer scripts
---------
Co-authored-by: Marc Cummings <[email protected]>
* Updated .gitignore, added build script
* Update nginx/production_nginx.conf
* Delete .github/dependabot.yml
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
* added placeable tmp location and TSE sequence (#42)
* fixed no MR images found
* fix docker compose
* updated paths now searching for multiple dicom extensions
* remove apptainer (#43)
* Containerize Node/NPM (#44)
This PR "eliminates" development mode to help with build reproducibility.
Previously, Node would install/build dependencies on the host and then mount
them into each container via Docker Compose. While Docker Compose was
initially used as a development environment it's been increasingly used as a
method of deployment for on premise installations of ezBIDS. This PR helps to
limit the variability introduced during the build process by the increasing number
of sites, users, and architectures (Apple Silicon). Development mode will be
re-introduced (hot loading/mounting) of code folders at a future date. For now,
the focus is on repeatability of deployments over developer ease.
* Moving node modules from being mounted to being built in the containers.
* Nginx and localhost:3000 compose versions both working
* Updated readme, renamed from docker-compose-production.yml to nginx
* Move keys into containers (#47)
Updated more steps to take place in containers and picked sane env defaults.
* added compile from tsc to js into handler container
* update default env's, add key placement into containers
* Update docker-compose.yml
* Delete .github/dependabot.yml
* fix typos
---------
Co-authored-by: Tim Budras <[email protected]>
Co-authored-by: Anthony Galassiae <[email protected]>
Co-authored-by: buti1021 <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
Co-authored-by: Marc Cummings <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+117-1Lines changed: 117 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,123 @@ Users do not need to organize their uploaded data in any specific manner, and us
31
31
32
32
Should users feel the need to anonymize data before uploading, we strongly recommend that subjects (and sessions, if applicable) be organized into subject (and session) folders, with explicit labeling of the preferred subjects (and sessions) IDs (e.g. `MRI_data/sub-01/ses-01/DICOMS`). Failure to do so for non-anonymized data may result in an inaccurate *first guess* and require additional edits in the web browser.
33
33
34
-
If users wish to install ezBIDS locally, to ensure that data do not leave their institution site, please see [here](https://brainlife.io/docs/using_ezBIDS/#installing-ezbids-locally).
34
+
#### Local Usage
35
+
36
+
There are two methods for deploying this service one for local use and another using nginx for sitewide deployments.
37
+
38
+
For users that can are not setting this service up for others it's recommended to run without nginx.
39
+
40
+
In either case, the initial setup requires configuring the local environment via
41
+
a `.env` file. The first steps are to copy the `example.env` file in this repo
42
+
to `.env`:
43
+
44
+
```bash
45
+
cd ezbids_docker
46
+
cp example.env .env
47
+
```
48
+
The env file you've created should look something like the following:
49
+
50
+
<details>
51
+
52
+
53
+
```bash
54
+
# Create/Copy this file as .env in the root of the project to set default environment variables
55
+
56
+
# insert your host name here, it should match your ssl certificate and/or the output
57
+
# of echo $HOSTNAME
58
+
SERVER_NAME=localhost
59
+
60
+
# Set the BRAINLIFE_USE_NGINX environment variable to true to use https"
61
+
# (this will launch the services on port 443) and run with nginx/production_nginx.conf"
62
+
# this will require providing the correct paths for the SSL_CERT_PATH, SSL_KEY_PATH and SSL_PASSWORD_PATH
63
+
# with false the UI will run on 3000"
64
+
BRAINLIFE_USE_NGINX=false
65
+
66
+
SSL_CERT_PATH=./nginx/ssl/sslcert.cert
67
+
SSL_KEY_PATH=./nginx/ssl/sslcert.key
68
+
SSL_PASSWORD_PATH=./nginx/ssl/sslpassword #if your key is not encrypted use an arbitrary path here
69
+
70
+
# Set the BRAINLIFE_AUTHENTICATION environment variable to true, if you're not running"
71
+
# this with brainlife don't use."
72
+
BRAINLIFE_AUTHENTICATION=false
73
+
74
+
# Set the BRAINLIFE_DEVELOPMENT enables additional debugging output and mounts
75
+
# the ezbids repo/folder into the various containers default is false"
76
+
BRAINLIFE_DEVELOPMENT=false
77
+
78
+
# Define which profiles to use, e.g. set to COMPOSE_PROFILES=telemetry to enable telemetry
79
+
COMPOSE_PROFILES=
80
+
81
+
# Choose whether to pre-sort flat folders full of dicoms, if enabled ezBIDS will attempt
82
+
# to organize a flat folder of dicoms into sub-< indexed subject number > and if applicable
83
+
# ses-< indexed session number> folders.
84
+
PRESORT=false
85
+
86
+
# can set a custom workingdir/temp dir all uploaded files and work will be performed in
87
+
# this directory, defaults to /tmp in the docker compose file if it's not set here.
88
+
EZBIDS_TMP_DIR=
89
+
```
90
+
91
+
</details>
92
+
93
+
#### Environment Variable Details
94
+
95
+
-`BRAINLIFE_AUTHENTICATION`: This version of ezBIDS has only been tested without user authentication. You will want to keep this value set to false.
96
+
-`PRESORT`: Enable this option if your data is a flat folder full of dicoms, otherwise it's best to organize your such that a single scan/session/modality is contained in it's own folder. In order to extract the necessary PET metadata (information from spreadsheets) this variable should be disabled with `false`
97
+
-`EZBIDS_TMP_DIR`: By default ezBIDS will write data to `/tmp/ezbids-workdir`, you can change that default path by providing a different path here.
98
+
-`BRAINLIFE_USE_NGINX`: Enable with `true` if you want to host this service to multiple clients. Nginx requires ssl certificates to function, you have the option of
99
+
generating self signed or providing certificates from a registered authority.
100
+
-`SERVER_NAME`: Defaults to local host, if using Nginx then set this to the host name matching the server/ssl certificate.
101
+
102
+
103
+
#### Nginx Setup
104
+
105
+
There are some additional steps required for running this service with nginx and https, namely providing ssl certificates. To create self signed certificates run the
106
+
`create_self_signed_certs.sh` script and provide the hostname/ipaddress of the host
107
+
as the first argument. This will create all of the certificates you need and locate
108
+
them in the `nginx/ssl/` folder. If you want to provide your own certificates place
109
+
them manually in the `nginx/ssl/` folder and rename them to follow this convention:
110
+
111
+
`sslcert.cert`, `sslcert.key`, and if your certificate is encrypted provide the password file as `sslpassword`.
112
+
113
+
The Nginx folder exists solely to hold certs and configuration files:
114
+
115
+
```bash
116
+
tree nginx/
117
+
nginx/
118
+
├── production_nginx.conf
119
+
└── ssl
120
+
├── sslpassword # optional file
121
+
├── sslcert.cert
122
+
└── sslcert.key
123
+
124
+
2 directories, 3 files
125
+
```
126
+
127
+
If you're using a password make sure to uncomment the line in the nginx config file (`nginx/production_nginx.conf`) for that password file.
Once you've completed your configuring, you can start the application with the `launch.sh` script. It will export the variables set in the `.env` file to your environment and based on your choices launch ezBIDS at `localhost:3000` or `https://yourhostname/`
142
+
143
+
If you're switching between nginx or the localhost option make sure to rebuild the
Using `--no-cache` might slow things down, but it's a way to ensure you don't run into issues with "stale" containers. The `--parallel` flag can speed things up as it
0 commit comments