taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 44df2ee84fa9276cae24e5521f86004a6a9172a9
parent 2b6efc17cc2f4da9f3f5a15572fafb42f4326bd9
Author: Florian Dold <florian@dold.me>
Date:   Thu,  3 Aug 2023 21:47:18 +0200

sandcastle: change default merchant apikey

Diffstat:
Dsandcastle/config/deployment-per-service.ts | 52----------------------------------------------------
Msandcastle/config/deployment.conf | 2+-
Msandcastle/config/exchange/taler.conf | 4++++
Msandcastle/docker-compose.yml | 2+-
Msandcastle/images/exchange/scripts/config.sh | 5+++++
5 files changed, 11 insertions(+), 54 deletions(-)

diff --git a/sandcastle/config/deployment-per-service.ts b/sandcastle/config/deployment-per-service.ts @@ -1,52 +0,0 @@ -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]; // Only used in libeufin. -} - -interface BankConfig { - baseUrl: URL; - allowRegistrations: boolean; - withSignupBonus: boolean; - bankMaxDebt: number; - customerMaxDebt: number; -} - -interface BankWebUi { - backendUrl: URL; -} - -interface MerchantConfig { - baseUrl: URL; - instances: [InstanceConfig]; -} - -interface InstanceConfig { - id: string; - url: URL; - apikey: ApiKey; - bankAccount: BankAccount; -} diff --git a/sandcastle/config/deployment.conf b/sandcastle/config/deployment.conf @@ -1,6 +1,6 @@ [taler-deployment] currency = EUR -merchant-apikey = secret-token:salt +merchant-apikey = secret-token:secret merchant-url = http://localhost:5556/ exchange-nexus-username = exchange-at-nexus exchange-nexus-password = secret-at-nexus diff --git a/sandcastle/config/exchange/taler.conf b/sandcastle/config/exchange/taler.conf @@ -1,3 +1,7 @@ +# This file is a configuration template for the exchange. +# When the exchange container is started, values from deployment.conf +# are inserted into the __...__ placeholders here. + [taler] currency = __CURRENCY__ currency_round_unit = __CURRENCY__:0.01 diff --git a/sandcastle/docker-compose.yml b/sandcastle/docker-compose.yml @@ -13,7 +13,7 @@ services: volumes: - talerlogs:/logs - talerdata:/var/lib/postgresql/data/ - - ${TALER_SANDCASTLE_CONFIG:-./config}:/config:ro + - ./config:/config:ro environment: # root is the only role existing in the DBMS. That # matches the role used by other containers when diff --git a/sandcastle/images/exchange/scripts/config.sh b/sandcastle/images/exchange/scripts/config.sh @@ -1,5 +1,10 @@ #!/bin/bash +# This script takes the deployment configuration from /config, +# generates the taler exchange specific configuration in /etc +# and sets some environment variables needed to properly +# run the exchange. + set -o pipefail set -eu