Skip to content

Commit

Permalink
Merge pull request #95 from samply/feature/make-backends-configurable
Browse files Browse the repository at this point in the history
Feature/make backends configurable
  • Loading branch information
torbrenner authored Jun 20, 2024
2 parents b566e4b + 14d8463 commit f46a400
Show file tree
Hide file tree
Showing 39 changed files with 2,582 additions and 384 deletions.
6 changes: 4 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ services:
spot:
image: samply/rustyspot:main
ports:
- 8080:8080
- 8055:8055
environment:
RUST_LOG: "info"
CORS_ORIGIN: http://localhost:5173
BEAM_SECRET: "${LOCAL_BEAM_SECRET_SPOT}"
BEAM_PROXY_URL: http://beam-proxy:8081
BEAM_APP_ID: "spot.${LOCAL_BEAM_ID}.${BROKER_HOST}"
BEAM_APP_ID: "focus.${LOCAL_BEAM_ID}.${BROKER_HOST}"
depends_on:
- "beam-proxy"
profiles:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ services:

spot:
image: samply/rustyspot:main
ports:
- "8055:8055"
environment:
HTTP_PROXY: ${http_proxy}
HTTPS_PROXY: ${https_proxy}
Expand Down
1 change: 1 addition & 0 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GUI_HOST="data.dktk.dkfz.de|demo.lens.samply.de"
BROKER_HOST="broker.ccp-it.dktk.dkfz.de"
LOCAL_BEAM_ID="your-proxy-id"
LOCAL_BEAM_SECRET_SPOT="insert-a-random-passphrase-here"
LOCAL_BEAM_SECRET_PRISM="insert-a-random-passphrase-here"

# Request your OAUTH client from your oauth provider admin
OAUTH_ISSUER_URL="the-discovery-adress-of-your-oauth-provider"
Expand Down
27 changes: 21 additions & 6 deletions options_tester.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
const __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};

console.log(
"Checking Lens options for ",
process.env.VITE_TARGET_ENVIRONMENT,
);

let optionsPath = "";
if (process.env.VITE_TARGET_ENVIRONMENT === "production") {
optionsPath = "./packages/demo/public/options-ccp-prod.json";
} else if (process.env.VITE_TARGET_ENVIRONMENT === "staging") {
optionsPath = "./packages/demo/public/options-ccp-demo.json";
} else {
optionsPath = "./packages/demo/public/options-dev.json";
}

Object.defineProperty(exports, "__esModule", { value: true });
var options_schema_json_1 = __importDefault(require("./packages/lib/src/interfaces/options.schema.json"));
var schemasafe_1 = require("@exodus/schemasafe");
var options_json_1 = __importDefault(require("./packages/demo/public/options.json"));
const options_schema_json_1 = __importDefault(require("./packages/lib/src/types/options.schema.json"));
const schemasafe_1 = require("@exodus/schemasafe");
const options_json_1 = __importDefault(require(optionsPath));
console.log("Checking Lens options");
var parse = (0, schemasafe_1.parser)(options_schema_json_1.default, {
const parse = (0, schemasafe_1.parser)(options_schema_json_1.default, {
includeErrors: true,
allErrors: true,
});
var validJSON = parse(JSON.stringify(options_json_1.default));
const validJSON = parse(JSON.stringify(options_json_1.default));
if (validJSON.valid === true) {
console.log("Options are valid");
}
Expand Down
20 changes: 17 additions & 3 deletions options_tester.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import optionsSchema from "./packages/lib/src/interfaces/options.schema.json";
import optionsSchema from "./packages/lib/src/types/options.schema.json";
import { parser } from "@exodus/schemasafe";

import options from "./packages/demo/public/options.json";
import devOptions from "./packages/demo/public/options-dev.json";
import demoOptions from "./packages/demo/public/options-ccp-demo.json";
import prodOptions from "./packages/demo/public/options-ccp-prod.json";

console.log("Checking Lens options");
console.log(
"Checking Lens options for ",
import.meta.env.VITE_TARGET_ENVIRONMENT,
);

let options = {};
if (import.meta.env.VITE_TARGET_ENVIRONMENT === "production") {
options = prodOptions;
} else if (import.meta.env.VITE_TARGET_ENVIRONMENT === "staging") {
options = demoOptions;
} else {
options = devOptions;
}

const parse = parser(optionsSchema, {
includeErrors: true,
Expand Down
17 changes: 10 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f46a400

Please sign in to comment.