kych

OAuth 2.0 API for Swiyu to enable Taler integration of Swiyu for KYC (experimental)
Log | Files | Refs

commit 0df8bd5f8df03481a87a4a93c44c7a7e03c08d7f
parent f0b59a5a12a608dce46b44677b70b7ac5da9a259
Author: Henrique Chan Carvalho Machado <henriqueccmachado@tecnico.ulisboa.pt>
Date:   Fri, 28 Nov 2025 18:29:53 +0100

swiyu-verifier: add db install scripts

Diffstat:
Aswiyu-verifier/install_db.sh | 10++++++++++
Aswiyu-verifier/run.sh | 15+++++++++++++++
Aswiyu-verifier/uninstall_db.sh | 6++++++
3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/swiyu-verifier/install_db.sh b/swiyu-verifier/install_db.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +DB_PORT=5455 +DB_NAME=verifier_db +DB_USER=verifier_user +DB_PASS=secret + +psql -d postgres -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" +psql -d postgres -c "CREATE DATABASE $DB_NAME OWNER $DB_USER;" +psql -d $DB_NAME -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" diff --git a/swiyu-verifier/run.sh b/swiyu-verifier/run.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ "$1" == "clean" ] + echo "Building the project" + ./mvnw clean install -DskipTests +fi + +if [ "$1" == "-d" ]; then + echo "Running in debug mode. Attach debugger to port 5005" + ./mvnw spring-boot:run -pl verifier-application -Dspring-boot.run.profiles=local-dockerless -Dspring-boot.run.fork=true -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" + exit 0 +fi + +echo "Running the application" +./mvnw spring-boot:run -pl verifier-application -Dspring-boot.run.profiles=local-dockerless diff --git a/swiyu-verifier/uninstall_db.sh b/swiyu-verifier/uninstall_db.sh @@ -0,0 +1,6 @@ +#!/bin/bash +DB_NAME=verifier_db +DB_USER=verifier_user + +dropdb $DB_NAME +dropuser $DB_USER