feat: bootstrap b2bcall architecture
- docs/ARCHITECTURE.md: decisoes de arquitetura (monorepo, rede Asterisk host mode, realtime PJSIP, camada de telefonia, seguranca desde o design) - TODO.md: checklist vivo de implementacao por fases - estrutura inicial do monorepo (apps/, packages/, infrastructure/, scripts/) - docker-compose.yml: postgres 17 + redis 7 com healthchecks, sem portas publicadas no host, schema 'asterisk' dedicado no Postgres - .env.example + scripts/generate-secrets.sh
This commit is contained in:
15
scripts/generate-secrets.sh
Executable file
15
scripts/generate-secrets.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Gera valores fortes para os segredos do .env.
|
||||
# Uso: ./scripts/generate-secrets.sh (imprime pares KEY=VALUE para colar no .env)
|
||||
set -euo pipefail
|
||||
|
||||
rand_hex() { openssl rand -hex "${1:-32}"; }
|
||||
rand_b64() { openssl rand -base64 "${1:-32}"; }
|
||||
|
||||
echo "POSTGRES_PASSWORD=$(rand_hex 24)"
|
||||
echo "REDIS_PASSWORD=$(rand_hex 24)"
|
||||
echo "JWT_ACCESS_SECRET=$(rand_hex 64)"
|
||||
echo "JWT_REFRESH_SECRET=$(rand_hex 64)"
|
||||
echo "SECRETS_MASTER_KEY=$(rand_b64 32)"
|
||||
echo "AMI_SECRET=$(rand_hex 24)"
|
||||
echo "ARI_SECRET=$(rand_hex 24)"
|
||||
Reference in New Issue
Block a user