ЛР6: наблюдаемость, SLO и диагностика отказов
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
New-Item -ItemType Directory -Force secrets | Out-Null
|
||||
$values = @{postgres_db='messenger'; postgres_user='messenger'; postgres_password=''; minio_root_user='labadmin'; minio_root_password=''; s3_access_key_id='labapi'; s3_secret_access_key=''; grafana_admin_password=''}
|
||||
foreach ($name in $values.Keys) {
|
||||
$path = Join-Path secrets ($name + '.txt')
|
||||
if (!(Test-Path -LiteralPath $path)) {
|
||||
$value = $values[$name]
|
||||
if (!$value) { $value = [Convert]::ToBase64String([System.Security.Cryptography.RandomNumberGenerator]::GetBytes(32)) }
|
||||
[System.IO.File]::WriteAllText((Join-Path (Get-Location) $path), $value)
|
||||
}
|
||||
}
|
||||
if (!(Test-Path .env)) { Copy-Item .env.example .env }
|
||||
Reference in New Issue
Block a user