added update notice, re-running db
Some checks failed
Deploy / deploy (push) Successful in 1m9s
Security Tests / security-non-db (push) Successful in 20s
Security Tests / security-db (push) Failing after 19s

This commit is contained in:
2026-03-10 21:25:17 -05:00
parent fe96bf85da
commit a7e3448d28
2 changed files with 22 additions and 5 deletions

8
.env
View File

@@ -31,9 +31,9 @@ EMAIL_FROM="SkyMoney Budget <no-reply@skymoneybudget.com>"
EMAIL_BOUNCE_FROM=bounces@skymoneybudget.com
EMAIL_REPLY_TO=support@skymoneybudget.com
UPDATE_NOTICE_VERSION=5
UPDATE_NOTICE_TITLE="Important Service Update"
UPDATE_NOTICE_BODY="We experienced a production database incident that resulted in loss of stored account data. We have restored system access and strengthened backup/recovery protections. Please review your account and re-enter any missing data. If you need help, contact support@skymoneybudget.com."
UPDATE_NOTICE_VERSION=6
UPDATE_NOTICE_TITLE="Added estimate Fixed Expenses"
UPDATE_NOTICE_BODY="We added estimate amounts for fixed expenses in the onboarding proccess. Now, users can add estimate totals for fixed expenses if they are unsure of the ending total amount due."
ALLOW_INSECURE_AUTH_FOR_DEV=false
JWT_ISSUER=skymoney-api
JWT_AUDIENCE=skymoney-web
@@ -48,4 +48,4 @@ EXPECTED_PROD_DB_NAME=skymoney
EXPECTED_BACKUP_DB_HOST=127.0.0.1
EXPECTED_BACKUP_DB_NAME=skymoney
PROD_DB_VOLUME_NAME=skymoney_pgdata
ALLOW_EMPTY_PROD_VOLUME=0
ALLOW_EMPTY_PROD_VOLUME=0

View File

@@ -15,17 +15,34 @@ extract_db() {
sed -E 's#^[a-zA-Z][a-zA-Z0-9+.-]*://[^/]+/([^?]+).*$#\1#' <<< "$url"
}
extract_host() {
local url="$1"
sed -E 's#^[a-zA-Z][a-zA-Z0-9+.-]*://[^@/]+@([^/:?]+).*$#\1#' <<< "$url"
}
TEST_DB_NAME="$(extract_db "$TEST_DATABASE_URL")"
if [[ "$TEST_DB_NAME" == "$TEST_DATABASE_URL" || -z "$TEST_DB_NAME" ]]; then
echo "Unable to parse TEST_DATABASE_URL database name."
exit 1
fi
TEST_DB_HOST="$(extract_host "$TEST_DATABASE_URL")"
if [[ "$TEST_DB_HOST" == "$TEST_DATABASE_URL" || -z "$TEST_DB_HOST" ]]; then
echo "Unable to parse TEST_DATABASE_URL host."
exit 1
fi
if [[ -n "${DATABASE_URL:-}" && "$TEST_DATABASE_URL" == "$DATABASE_URL" ]]; then
echo "TEST_DATABASE_URL must not equal DATABASE_URL."
exit 1
fi
if [[ "${ALLOW_TEST_DB_DOCKER_HOST:-0}" != "1" && "$TEST_DB_HOST" == "postgres" ]]; then
echo "TEST_DATABASE_URL host 'postgres' is not reachable from host-runner jobs."
echo "Use host-mapped URL (for example: postgres://...@127.0.0.1:5432/skymoney_test)."
exit 1
fi
IFS=',' read -r -a protected <<< "$PROTECTED_DB_NAMES"
for name in "${protected[@]}"; do
trimmed="$(echo "$name" | xargs)"
@@ -44,4 +61,4 @@ if [[ "$REQUIRE_TEST_DB_NAME" == "1" ]]; then
fi
fi
echo "TEST_DATABASE_URL target check passed (db=$TEST_DB_NAME)."
echo "TEST_DATABASE_URL target check passed (host=$TEST_DB_HOST db=$TEST_DB_NAME)."