Skip to content

Commit 7fd2132

Browse files
authored
Merge pull request #1406 from chhsiao1981/integrate-chris-backend
integrate with chris-backend.
2 parents 6707875 + 61aa003 commit 7fd2132

File tree

4 files changed

+23
-56
lines changed

4 files changed

+23
-56
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "third-party/mipav-to-niivue"]
1414
path = third-party/mipav-to-niivue
1515
url = git@github.com:chhsiao1981/mipav-to-niivue.git
16+
[submodule "third-party/chris-backend"]
17+
path = third-party/chris-backend
18+
url = git@github.com:FNNDSC/chris-backend.git

README.md

Lines changed: 14 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,82 +16,43 @@ This repository contains the reference UI for ChRIS, allowing users to create an
1616
```shell
1717
git clone https://github.com/FNNDSC/ChRIS_ui.git
1818
cd ChRIS_ui
19+
git submodule update --init --recursive
1920
pnpm install
20-
pnpm run dev:public
21+
22+
# start chris-backend
23+
pnpm run chris-backend:up
24+
25+
# in another terminal
26+
pnpm start
2127
```
2228

2329
### docker-compose
2430

25-
1. setup `docker_compose.env` based on [docker_compose.env.tmpl](https://github.com/FNNDSC/ChRIS_ui/blob/branch-7.0/docker_compose.env.tmpl)
31+
1. setup `docker_compose.env` based on [docker_compose.env.tmpl](https://github.com/FNNDSC/ChRIS_ui/blob/main/docker_compose.env.tmpl)
2632
2. `docker compose --env-file docker_compose.env -f docker-compose.yaml up -d`
2733

2834

2935
## Development
3036

31-
There are two modes of development:
32-
33-
- "local": runs the _ChRIS_ backend locally. Requires Docker, and uses more disk space + slower startup time.
34-
- "public": use the global, public testing server. This is the easier option, especially for non-Linux OS.
35-
36-
<details>
37-
<summary>
38-
<strong>
39-
Alternatively, start the backend in development mode (click to expand)
40-
</strong>
41-
</summary>
42-
43-
##### Get the backend running from ChRIS_ultron_backEnd
44-
45-
```bash
46-
$ git clone https://github.com/FNNDSC/ChRIS_ultron_backEnd.git
47-
$ cd ChRIS_ultron_backEnd
48-
$ ./make.sh -U -I -i
49-
```
50-
51-
##### Tearing down the ChRIS backend
52-
53-
You can later remove all the backend containers and release storage volumes with:
54-
55-
```bash
56-
$ cd ChRIS_ultron_backEnd
57-
$ sudo rm -r FS
58-
$ ./unmake.sh
59-
```
60-
61-
</details>
62-
63-
If your backend is accessible from a host other than localhost, e.g. you are using a cloud or remote development
64-
server, run `cp .env .env.development.local` then edit `.env.development.local` with your backend API URL.
65-
66-
### 1. Dependencies
67-
68-
You need Node version 20 or 21.
37+
### 1. Clone the repository
6938

7039
```shell
7140
git clone https://github.com/FNNDSC/ChRIS_ui.git
7241
cd ChRIS_ui
42+
git submodule update --init --recursive
7343
pnpm install
7444
```
7545

76-
#### Local Development Dependencies
77-
78-
No extra dependencies are required when using the "public" server.
79-
80-
If you intend on developing with the "local" server, you will need **Docker** and Docker Compose
81-
to run the backend and helper scripts.
82-
83-
### 2. Run the development server
84-
85-
Either using the "public" server:
46+
### 2. Run the chris-backend in local
8647

8748
```shell
88-
pnpm run dev:public
49+
pnpm run chris-backend:up
8950
```
9051

91-
Or, start a local backend and run the "local" server:
52+
### 3. Start development (in another terminal)
9253

9354
```shell
94-
pnpm run dev:local
55+
pnpm start
9556
```
9657

9758
## Container Image

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"private": true,
44
"version": "0.0.0",
55
"scripts": {
6-
"start": "pnpm run dev:local",
7-
"dev": "pnpm run dev:local",
8-
"dev:local": "pnpm run test:prepare && vite",
6+
"start": "pnpm run dev:metal",
7+
"dev:legacy": "pnpm run test:prepare && vite",
98
"dev:public": "vite -c testing/publicCUBE/vite.config.ts",
109
"dev:metal": "vite",
1110
"build": "vite build",
@@ -29,6 +28,9 @@
2928
"get-dicoms": "./testing/getDicoms.mjs",
3029
"list-mrns": "./testing/miniChRIS/scripts/list_mrns.sh",
3130
"upload-dicom": "./testing/miniChRIS/scripts/upload2orthanc.sh",
31+
"__chris-backend:comment": "# chris-backend:* commands are for running ",
32+
"chris-backend:up": "cd third-party/chris-backend; scripts/run-docker-compose.sh; scripts/run-dev.sh; cd ../..",
33+
"__dev-utils:comment": "# biome: lint, fix, and fmt. vite: preview",
3234
"lint": "biome lint .",
3335
"fix": "biome check --apply .",
3436
"fix:unsafe": "biome check --apply-unsafe .",

third-party/chris-backend

Submodule chris-backend added at 59cb2b6

0 commit comments

Comments
 (0)