summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorMS <ms@taler.net>2022-11-24 19:35:39 +0100
committerMS <ms@taler.net>2022-11-24 19:35:39 +0100
commit1a300de277f40e9572a3fcad2e209b1e3ff96c8a (patch)
treec1e2d77f4b2f7ce87a04be1fc8d63be08e731a76 /docker
parent9f6a3d8a62cc245451da61d14f9779b0c1453179 (diff)
downloaddeployment-1a300de277f40e9572a3fcad2e209b1e3ff96c8a.tar.gz
deployment-1a300de277f40e9572a3fcad2e209b1e3ff96c8a.tar.bz2
deployment-1a300de277f40e9572a3fcad2e209b1e3ff96c8a.zip
Drafting the per-service TypeScript config.
Diffstat (limited to 'docker')
-rw-r--r--docker/demo/config/deployment-per-service.ts57
1 files changed, 57 insertions, 0 deletions
diff --git a/docker/demo/config/deployment-per-service.ts b/docker/demo/config/deployment-per-service.ts
new file mode 100644
index 0000000..cd2eb11
--- /dev/null
+++ b/docker/demo/config/deployment-per-service.ts
@@ -0,0 +1,57 @@
+class ApiKey {
+ apikey: string;
+ constructor(apikey: string) {
+ if (!apikey.startsWith("secret-token:")) {
+ throw Error("Given API key lacks leading 'secret-token:' part.")
+ }
+ this.apikey = apikey;
+ }
+}
+
+interface BankAccount {
+ username: string;
+ password: string;
+}
+
+interface NexusAccount {
+ username: string;
+ password: string;
+}
+
+
+// Values (potentially) needed by more than one container.
+interface GlobalConfig {
+ currency: string;
+ dbPassword: string;
+ exchangeBaseUrl: URL; // used by merchant and exchange.
+ exchangeNexusAccount: NexusAccount; // used by libeufin and exchange.
+ bankAccounts: [BankAccount];
+}
+
+interface BankConfig {
+ baseUrl: URL;
+ allowRegistrations: boolean;
+ withSignupBonus: boolean;
+ bankMaxDebt: number;
+ customerMaxDebt: number;
+}
+
+interface BankWebUi {
+ backendUrl: URL;
+}
+
+interface ExchangeConfig {
+ bankAccount: BankAccount;
+}
+
+interface MerchantConfig {
+ baseUrl: URL;
+ instances: [InstanceConfig];
+}
+
+interface InstanceConfig {
+ id: string;
+ url: URL;
+ apikey: ApiKey;
+ bankAccount: BankAccount;
+}