diff --git a/Compose/pgsql/compose-build.yml b/Compose/pgsql/compose-build.yml index 12c205b0..77c8727b 100644 --- a/Compose/pgsql/compose-build.yml +++ b/Compose/pgsql/compose-build.yml @@ -7,6 +7,7 @@ version: "3.8" services: dataimport: + platform: linux/x86_64 build: context: ../../ dockerfile: Dockerfile @@ -26,9 +27,9 @@ services: APPSETTINGS__SHARENAME: "${APPSETTINGS__SHARENAME:-/app/Common/temp}" TZ: "${TIME_ZONE:-US/Central}" depends_on: - - pb-dataimport + - pb-dataimport restart: always - hostname: dataimport + hostname: dataimport container_name: ed-fi-dataimport db-dataimport: @@ -43,12 +44,21 @@ services: - vol-db-dataimport:/var/lib/postgresql/data restart: always container_name: ed-fi-db-dataimport + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"] + start_period: "60s" + retries: 3 pb-dataimport: - image: pgbouncer/pgbouncer@sha256:aa8a38b7b33e5fe70c679053f97a8e55c74d52b00c195f0880845e52b50ce516 #pgbouncer:1.15.0 + image: bitnami/pgbouncer environment: - DATABASES: "* = host = db-dataimport port=5432 user=${POSTGRES_USER} password=${POSTGRES_PASSWORD}" - POSTGRES_PORT: "${POSTGRES_PORT:-6432}" + PGBOUNCER_DATABASE: "*" + PGBOUNCER_PORT: "${PGBOUNCER_LISTEN_PORT:-6432}" + POSTGRESQL_USER: "${POSTGRES_USER}" + POSTGRESQL_PASSWORD: "${POSTGRES_PASSWORD}" + POSTGRESQL_HOST: db-dataimport + PGBOUNCER_SET_DATABASE_USER: "yes" + PGBOUNCER_SET_DATABASE_PASSWORD: "yes" ports: - "5403:${POSTGRES_PORT:-6432}" restart: always @@ -59,4 +69,4 @@ services: volumes: vol-db-dataimport: driver: local - name: vol-db-dataimport \ No newline at end of file + name: vol-db-dataimport diff --git a/DataImport.Web/Helpers/JsonValidator.cs b/DataImport.Web/Helpers/JsonValidator.cs index f5417601..b97966e7 100644 --- a/DataImport.Web/Helpers/JsonValidator.cs +++ b/DataImport.Web/Helpers/JsonValidator.cs @@ -48,4 +48,4 @@ public bool IsValidJson(string data) return false; } } -} \ No newline at end of file +} diff --git a/build.ps1 b/build.ps1 index ce47b484..07492936 100644 --- a/build.ps1 +++ b/build.ps1 @@ -76,7 +76,7 @@ param( # Assembly and package version number. The current package number is # configured in the build automation tool and passed to this script. [string] - $Version = "0.1.0", + $Version = "0.1.0", # .NET project build configuration, defaults to "Debug". Options are: Debug, Release. [string] @@ -136,7 +136,7 @@ $appCommonPackageVersion = "3.1.0" Import-Module -Name "$PSScriptRoot/eng/build-helpers.psm1" -Force Import-Module -Name "$PSScriptRoot/eng/package-manager.psm1" -Force -function Clean { +function DotNetClean { Invoke-Execute { dotnet clean $solutionRoot -c $Configuration --nologo -v minimal } } @@ -151,7 +151,7 @@ function InitializePython { if (-not (Test-Path $python)) { $sourcePythonZip = "https://www.python.org/ftp/python/3.10.2/python-3.10.2-embed-amd64.zip" $destPythonZip = "$toolsDir\python-3.10.2-embed-amd64.zip" - + Write-Host "Downloading python 3.10.2 official release" Invoke-WebRequest $sourcePythonZip -OutFile $destPythonZip Expand-Archive $destPythonZip -DestinationPath "$toolsDir\python" @@ -159,7 +159,7 @@ function InitializePython { } } -function Clean { +function DotNetClean { Invoke-Execute { dotnet clean $solutionRoot -c $Configuration --nologo -v minimal } } @@ -214,7 +214,7 @@ function PublishTransformLoad { function PublishTransformLoadSelfContained { Invoke-Execute { $outputPath = "$solutionRoot/$transformLoadProject/publish/scd" - $project = "$solutionRoot/$transformLoadProject/" + $project = "$solutionRoot/$transformLoadProject/" dotnet publish $project -c $Configuration /p:EnvironmentName=Production -o $outputPath -r win10-x64 --nologo --self-contained true } } @@ -299,14 +299,14 @@ function NewDevCertificate { } function BuildPackage { - $baseProjectFullName = "$solutionRoot/$entryProject/$entryProject" + $baseProjectFullName = "$solutionRoot/$entryProject/$entryProject" RunDotNetPack -PackageVersion $Version -projectName $baseProjectFullName $baseProjectFullName } function PushPackage { param ( [string] - $PackageVersion = $Version + $PackageVersion = $Version ) if (-not $NuGetApiKey) { @@ -314,12 +314,12 @@ function PushPackage { } if (-not $PackageFile) { - if("Web" -ieq $PackageFileType){ - $PackageFile = "$PSScriptRoot/$entryProject.$PackageVersion.nupkg" + if("Web" -ieq $PackageFileType){ + $PackageFile = "$PSScriptRoot/$entryProject.$PackageVersion.nupkg" DotnetPush $PackageFile } - else { - $PackageFile = "$PSScriptRoot/$transformLoadProject.$PackageVersion.nupkg" + else { + $PackageFile = "$PSScriptRoot/$transformLoadProject.$PackageVersion.nupkg" DotnetPush $PackageFile $PackageFileWin64 = "$PSScriptRoot/$transformLoadProject.Win64.$PackageVersion.nupkg" DotnetPush $PackageFileWin64 @@ -344,7 +344,7 @@ function DotnetPush { function Invoke-Build { Write-Host "Building Version $Version" -ForegroundColor Cyan - Invoke-Step { Clean } + Invoke-Step { DotNetClean } Invoke-Step { Restore } Invoke-Step { Compile } } @@ -370,11 +370,11 @@ function Invoke-Run { } function Invoke-SetUp { - Invoke-Step { InitializePython } + Invoke-Step { InitializePython } } function Invoke-Clean { - Invoke-Step { Clean } + Invoke-Step { DotNetClean } } function Invoke-UnitTests { @@ -394,11 +394,11 @@ function Invoke-BuildPackage { Invoke-Step { BuildPackage } } -function Invoke-BuildTransformLoadPackage { +function Invoke-BuildTransformLoadPackage { Invoke-Step { BuildTransformLoadPackage } } -function Invoke-PushPackage { +function Invoke-PushPackage { Invoke-Step { PushPackage } } @@ -429,10 +429,10 @@ function Invoke-DockerDeploy { function Invoke-SetAssemblyInfo { Write-Output "Setting Assembly Information" -ForegroundColor Cyan - Invoke-Step { AssemblyInfo } + Invoke-Step { AssemblyInfo } } -function AddAppCommonPackageForInstaller { +function AddAppCommonPackageForInstaller { $destinationPath = "$PSScriptRoot/Installer" $arguments = @{ @@ -448,7 +448,7 @@ function AddAppCommonPackageForInstaller { Invoke-Main { if($IsLocalBuild) { - $nugetExePath = Install-NugetCli + $nugetExePath = Install-NugetCli Set-Alias nuget $nugetExePath -Scope Global -Verbose } switch ($Command) {