From f8b1c65221271b03e0a9b9564eba3951955e52d7 Mon Sep 17 00:00:00 2001 From: foefl Date: Fri, 31 Jul 2026 16:04:15 +0200 Subject: [PATCH] update build pipeline and deployment config --- deployment/.env | 4 ++-- scripts/build.ps1 | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/deployment/.env b/deployment/.env index c87bc30..8efb520 100644 --- a/deployment/.env +++ b/deployment/.env @@ -1,6 +1,6 @@ DOPT_STOP_FOLDER_NAME=python -DOPT_DB_CRM=data/wce_crm.db -DOPT_DB_MAIN=data/wce_grunderfassung.db +DOPT_DB_CRM=data/db/wce_crm.db +DOPT_DB_MAIN=data/db/wce_grunderfassung.db DOPT_PATH_LOGGING=data/logs DOPT_PATH_FILE_STORAGE=data/files DOPT_ALEMBIC_BASE=python/alembic \ No newline at end of file diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 55424fb..13a79f0 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -45,15 +45,10 @@ Write-Output "Deleted outstanding artifacts successfully" Write-Output "Create data folder..." $pattern = "dopt_nafka_wce-crm_v*" -$data_folder = Join-Path -Path $ENV_PATH -ChildPath 'data' -if (-not (Test-Path -Path $data_folder)){ - Write-Output "[PWSH] Data path not existing. Create..." - New-Item -Path $data_folder -ItemType Directory -} -else { - Write-Output "Data path already exists." -} +create_folder -base_path $ENV_PATH -folder_name 'data' -recreate +create_folder -base_path $ENV_PATH -folder_name 'data/db' +create_folder -base_path $ENV_PATH -folder_name 'data/files' Write-Output "Building package..." @@ -93,10 +88,10 @@ if ($? -eq $false){ } Write-Output "Successfully installed package" -# copy database file +# copy database files Write-Output "Copying database files..." $copy_file = Join-Path -Path $SRC_PATH -ChildPath 'data/db/wce_grunderfassung.db' -$dest_file = Join-Path -Path $ENV_PATH -ChildPath 'data' +$dest_file = Join-Path -Path $ENV_PATH -ChildPath 'data/db' Copy-Item -Path $copy_file -Destination $dest_file -Force if ($? -eq $false){ Write-Output "[PWSH] Exiting script because there were errors while copying database 'Grunderfassung'"