From 76fbbae528ed0e5028245024fe68ca1993eda7f0 Mon Sep 17 00:00:00 2001 From: Kuba Date: Wed, 3 Jan 2024 15:39:05 +0100 Subject: [PATCH] feat(BUX-422): env name cleanup --- config/config.go | 2 +- entrypoint.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index b92d2d53..c5a6eb34 100644 --- a/config/config.go +++ b/config/config.go @@ -34,7 +34,7 @@ type DbConfig struct { Type DbType `mapstructure:"type"` SchemaPath string `mapstructure:"schema_path"` Dsn string `mapstructure:"dsn"` - FilePath string `mapstructure:"db_file_path"` + FilePath string `mapstructure:"file_path"` PreparedDb bool `mapstructure:"prepared_db"` PreparedDbFilePath string `mapstructure:"prepared_db_file_path"` } diff --git a/entrypoint.sh b/entrypoint.sh index fb089638..ad89fb4c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ export PRELOADED_DB_URL=${PRELOADED_DB_URL:? 'URL to download preloaded db is not set. Exiting.'} export PULSE_DB_PREPARED_DB=false -export PULSE_DB_DB_FILE_PATH=${PULSE_DB_DB_FILE_PATH:-'./data/blockheaders.db'} +export PULSE_DB_FILE_PATH=${PULSE_DB_FILE_PATH:-'./data/blockheaders.db'} export PULSE_DB_PREPARED_DB_FILE_PATH=${PULSE_DB_PREPARED_DB_FILE_PATH:-'./data/blockheaders.csv.gz'} preloaded=false clean=false @@ -20,9 +20,9 @@ function about() { } function clean_db() { - if [[ -e $PULSE_DB_DB_FILE_PATH ]]; then + if [[ -e $PULSE_DB_FILE_PATH ]]; then echo "Cleaning existing database" - rm $PULSE_DB_DB_FILE_PATH + rm $PULSE_DB_FILE_PATH fi if [[ -e $PULSE_DB_PREPARED_DB_FILE_PATH ]]; then echo "Cleaning existing preloaded database archive" @@ -31,7 +31,7 @@ function clean_db() { } function preload() { - if [[ -e $PULSE_DB_DB_FILE_PATH ]]; then + if [[ -e $PULSE_DB_FILE_PATH ]]; then echo "There is database file. Skipping preloading database." echo "If you want to remove this existing database and use preloaded one, then use the '--clean' argument." export PULSE_DB_PREPARED_DB=false