diff --git a/itcc-explorer/README.md b/itcc-explorer/README.md new file mode 100644 index 0000000..a64ed1d --- /dev/null +++ b/itcc-explorer/README.md @@ -0,0 +1,99 @@ +## Run ITCC Explorer + +```bash +# Local, production +docker compose -f itcc-explorer/compose.local.yaml up --pull always +# Local, test +docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml up --pull always +# Bridgehead, production +docker compose -f itcc-explorer/compose.bridgehead.yaml --env-file .env.beam up --pull always +# Bridgehead, test +docker compose -f itcc-explorer/compose.bridgehead.yaml -f itcc-explorer/compose.bridgehead.test.yaml --env-file .env.beam up --pull always +``` + +Then open http://localhost:3000/ in your browser. + +### Run frontend from source + +1. Determine the environment variables + ```bash + # Local, production + docker compose -f itcc-explorer/compose.local.yaml config --format json | ./getenv itcc-explorer + # Local, test + docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml config --format json | ./getenv itcc-explorer + # Bridgehead, production + docker compose -f itcc-explorer/compose.bridgehead.yaml --env-file .env.beam config --format json | ./getenv itcc-explorer + # Bridgehead, test + docker compose -f itcc-explorer/compose.bridgehead.yaml -f itcc-explorer/compose.bridgehead.test.yaml --env-file .env.beam config --format json | ./getenv itcc-explorer + ``` + +2. Bring up the other services + ```bash + # Local, production + docker compose -f itcc-explorer/compose.local.yaml up --pull always --scale itcc-explorer=0 + # Local, test + docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml up --pull always --scale itcc-explorer=0 + # Bridgehead, production + docker compose -f itcc-explorer/compose.bridgehead.yaml --env-file .env.beam up --pull always --scale itcc-explorer=0 + # Bridgehead, test + docker compose -f itcc-explorer/compose.bridgehead.yaml -f itcc-explorer/compose.bridgehead.test.yaml --env-file .env.beam up --pull always --scale itcc-explorer=0 + ``` + +3. Run https://github.com/samply/itcc-explorer from source + ```bash + [INSERT ENVIRONMENT VARIABLES] npm run dev -- --port 3000 + ``` + +### Run Spot from source + +1. Determine the environment variables + ```bash + # Local, production + docker compose -f itcc-explorer/compose.local.yaml config --format json | ./getenv spot + # Local, test + docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml config --format json | ./getenv spot + # Bridgehead, production + docker compose -f itcc-explorer/compose.bridgehead.yaml --env-file .env.beam config --format json | ./getenv spot + # Bridgehead, test + docker compose -f itcc-explorer/compose.bridgehead.yaml -f itcc-explorer/compose.bridgehead.test.yaml --env-file .env.beam config --format json | ./getenv spot + ``` + +2. Bring up the other services + ```bash + # Local, production + docker compose -f itcc-explorer/compose.local.yaml up --pull always --scale spot=0 + # Local, test + docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml up --pull always --scale spot=0 + # Bridgehead, production + docker compose -f itcc-explorer/compose.bridgehead.yaml --env-file .env.beam up --pull always --scale spot=0 + # Bridgehead, test + docker compose -f itcc-explorer/compose.bridgehead.yaml -f itcc-explorer/compose.bridgehead.test.yaml --env-file .env.beam up --pull always --scale spot=0 + ``` + +3. Run https://github.com/samply/spot from source + ```bash + [INSERT ENVIRONMENT VARIABLES] cargo run + ``` + +### Run Focus from source + +1. Determine the environment variables + ```bash + # Local, production + docker compose -f itcc-explorer/compose.local.yaml config --format json | ./getenv focus + # Local, test + docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml config --format json | ./getenv focus + ``` + +2. Bring up the other services + ```bash + # Local, production + docker compose -f itcc-explorer/compose.local.yaml up --pull always --scale focus=0 + # Local, test + docker compose -f itcc-explorer/compose.local.yaml -f itcc-explorer/compose.local.test.yaml up --pull always --scale focus=0 + ``` + +3. Run https://github.com/samply/focus from source + ```bash + [INSERT ENVIRONMENT VARIABLES] cargo run --features dktk + ``` diff --git a/itcc-explorer/compose.bridgehead.test.yaml b/itcc-explorer/compose.bridgehead.test.yaml new file mode 100644 index 0000000..0f5181a --- /dev/null +++ b/itcc-explorer/compose.bridgehead.test.yaml @@ -0,0 +1,10 @@ +services: + itcc-explorer: + image: samply/itcc-explorer:develop + environment: + PUBLIC_ENVIRONMENT: test + + spot: + image: samply/rustyspot:develop + environment: + SITES: dktk-test,dktk-datashield-test,berlin,berlin-test,dresden,essen,frankfurt,freiburg,luebeck,marburg,hannover,mainz,muenchen-lmu,muenchen-tum,ulm,wuerzburg,mannheim,hamburg diff --git a/itcc-explorer/compose.bridgehead.yaml b/itcc-explorer/compose.bridgehead.yaml new file mode 100644 index 0000000..ceca46d --- /dev/null +++ b/itcc-explorer/compose.bridgehead.yaml @@ -0,0 +1,38 @@ +services: + itcc-explorer: + image: samply/itcc-explorer:develop + ports: + - 3000:3000 + environment: + PUBLIC_SPOT_URL: http://localhost:8055 + + spot: + image: samply/rustyspot:main + depends_on: + - proxy1 + ports: + - 8055:8055 + extra_hosts: + - host.docker.internal:host-gateway + environment: + BEAM_PROXY_URL: http://host.docker.internal:4001 + BEAM_APP_ID: spot.${DEV_PROXY}.broker.ccp-it.dktk.dkfz.de + BEAM_SECRET: pass123 + CORS_ORIGIN: http://localhost:3000 + TRANSFORM: LENS + SITES: berlin-test,dresden,essen,frankfurt,freiburg,hannover,mainz,luebeck,muenchen-lmu,muenchen-tum,ulm,wuerzburg,mannheim,hamburg + + proxy1: + image: samply/beam-proxy:main + ports: + - 4001:4001 + environment: + BIND_ADDR: 0.0.0.0:4001 + BROKER_URL: https://broker.ccp-it.dktk.dkfz.de + PROXY_ID: ${DEV_PROXY}.broker.ccp-it.dktk.dkfz.de + PRIVKEY_FILE: /pki/${DEV_PROXY}.priv.pem + ROOTCERT_FILE: /pki/root.crt.pem + APP_spot_KEY: pass123 + APP_prism_KEY: pass123 + volumes: + - ${PKI_PATH}/broker.ccp-it.dktk.dkfz.de:/pki:ro diff --git a/itcc-explorer/compose.local.test.yaml b/itcc-explorer/compose.local.test.yaml new file mode 100644 index 0000000..46f5333 --- /dev/null +++ b/itcc-explorer/compose.local.test.yaml @@ -0,0 +1,8 @@ +services: + # itcc-explorer: + # image: samply/itcc-explorer:develop + # environment: + # PUBLIC_ENVIRONMENT: test + + spot: + image: samply/rustyspot:develop diff --git a/itcc-explorer/compose.local.yaml b/itcc-explorer/compose.local.yaml new file mode 100644 index 0000000..82e67c1 --- /dev/null +++ b/itcc-explorer/compose.local.yaml @@ -0,0 +1,56 @@ +services: + # itcc-explorer: + # image: samply/itcc-explorer:develop + # ports: + # - 3000:3000 + # environment: + # PUBLIC_SPOT_URL: http://localhost:8055 + + spot: + image: samply/rustyspot:main + depends_on: + - proxy1 + ports: + - 8055:8055 + extra_hosts: + - host.docker.internal:host-gateway + environment: + BEAM_PROXY_URL: http://host.docker.internal:4001 + BEAM_APP_ID: spot.proxy1.broker + BEAM_SECRET: pass123 + CORS_ORIGIN: http://localhost:3000 + TRANSFORM: LENS + SITES: proxy2 + + focus: + image: samply/focus:main-dktk + depends_on: + - proxy2 + extra_hosts: + - host.docker.internal:host-gateway + environment: + BEAM_PROXY_URL: http://host.docker.internal:4002 + BEAM_APP_ID_LONG: focus.proxy2.broker + API_KEY: pass123 + ENDPOINT_TYPE: blaze + BLAZE_URL: http://host.docker.internal:8080/fhir/ + OBFUSCATE: no + + blaze: + image: samply/blaze:latest + ports: + - 8080:8080 + healthcheck: + test: curl -f http://localhost:8080/fhir/metadata + start_period: 1m + + test-data-loader: + image: samply/test-data-loader:master + depends_on: + blaze: + condition: service_healthy + environment: + FHIR_STORE_URL: http://blaze:8080/fhir + +include: + - ../compose.localbeam.yaml