feat(deploy): add vps deployment assets
Some checks failed
CI / Backend Tests (push) Has been cancelled
CI / Frontend Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Naming Conventions (push) Has been cancelled
CI / Build Check (push) Has been cancelled

This commit is contained in:
2026-03-10 18:30:45 +01:00
parent 81e97c4f3b
commit a573a144e9
9 changed files with 925 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -eu
if [ -z "${TENANT_DATABASE_NAME:-}" ] || [ "${TENANT_DATABASE_NAME}" = "${POSTGRES_DB}" ]; then
exit 0
fi
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname postgres <<-EOSQL
SELECT format('CREATE DATABASE %I', '${TENANT_DATABASE_NAME}')
WHERE NOT EXISTS (
SELECT 1
FROM pg_database
WHERE datname = '${TENANT_DATABASE_NAME}'
) \gexec
EOSQL