forked from buerokratt/LLM-Module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrate.sh
More file actions
15 lines (11 loc) · 776 Bytes
/
migrate.sh
File metadata and controls
15 lines (11 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# Function to parse ini file and extract the value for a given key under a given section
get_ini_value() {
local file=$1
local key=$2
awk -F '=' -v key="$key" '$1 == key { gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2; exit }' "$file"
}
# Get the values from dsl_config.ini
INI_FILE="constants.ini"
DB_PASSWORD=$(get_ini_value "$INI_FILE" "DB_PASSWORD")
docker run --rm --network bykstack -v `pwd`/DSL/Liquibase/changelog:/liquibase/changelog -v `pwd`/DSL/Liquibase/master.yml:/liquibase/master.yml -v `pwd`/DSL/Liquibase/data:/liquibase/data liquibase/liquibase:4.33 --defaultsFile=/liquibase/changelog/liquibase.properties --changelog-file=master.yml --url=jdbc:postgresql://rag_search_db:5432/rag-search?user=postgres --password=$DB_PASSWORD update