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 9c26628561
9 changed files with 925 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -eu
if [ ! -f deploy/vps/.env ]; then
echo "Missing deploy/vps/.env"
exit 1
fi
JWT_PASSPHRASE=$(grep '^JWT_PASSPHRASE=' deploy/vps/.env | cut -d= -f2-)
if [ -z "$JWT_PASSPHRASE" ]; then
echo "JWT_PASSPHRASE is empty in deploy/vps/.env"
exit 1
fi
mkdir -p backend/config/jwt
openssl genrsa -aes256 -passout "pass:${JWT_PASSPHRASE}" -out backend/config/jwt/private.pem 4096
openssl rsa -pubout -passin "pass:${JWT_PASSPHRASE}" -in backend/config/jwt/private.pem -out backend/config/jwt/public.pem
chmod 600 backend/config/jwt/private.pem
chmod 644 backend/config/jwt/public.pem
echo "JWT keypair generated in backend/config/jwt"