Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
57 lines (50 loc) · 2.64 KB
/
Copy path.env.example
File metadata and controls
57 lines (50 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# ==============================================================================
# Oficina Gestão — Exemplo de Variáveis de Ambiente (Desenvolvimento Local)
# ==============================================================================
# NUNCA insira credenciais reais neste arquivo.
# Copie este arquivo para .env (que é ignorado pelo Git) e preencha seus dados:
# cp .env.example .env
# ==============================================================================
# Conexão com o Banco de Dados PostgreSQL (Neon)
DB_URL=jdbc:postgresql://localhost:5432/oficina_gestao_dev
DB_USERNAME=usuario_local_de_dev
DB_PASSWORD=senha_local_de_dev
# Banco PostgreSQL EXCLUSIVO para testes automatizados (obrigatoriamente local e com sufixo _test)
# Nunca reutilize DB_URL/DB_USERNAME/DB_PASSWORD nesta configuração.
TEST_DB_URL=jdbc:postgresql://localhost:5432/oficina_gestao_test
TEST_DB_USERNAME=oficina_test
TEST_DB_PASSWORD=senha_local_exclusiva_de_teste
# Configurações do Backend Spring Boot
SERVER_PORT=8080
SPRING_PROFILES_ACTIVE=dev
# Segurança e JWT (Segredo de 256 bits / 32+ caracteres)
JWT_SECRET=sua_chave_secreta_jwt_de_pelo_menos_32_caracteres_hex_ou_string
RATE_LIMIT_SECRET=gerar_outro_segredo_aleatorio_independente_com_32_bytes
SERVICE_PROXY_SECRET=gerar_terceiro_segredo_aleatorio_independente_com_32_bytes
JWT_EXPIRATION_MS=86400000
# Bootstrap da Conta Inicial da Proprietária (seed executado apenas se a tabela usuarios estiver vazia)
INITIAL_ADMIN_NAME=Proprietária Oficina
INITIAL_ADMIN_EMAIL=proprietaria@oficinagestao.com.br
INITIAL_ADMIN_PASSWORD=sua_senha_segura_aqui
# Proxies Reversos Confiáveis (SEC-03)
# IPs do seu proxy reverso (Cloudflare, Nginx, AWS ALB) separados por vírgula.
# Somente requisições vindas desses IPs terão os headers CF-Connecting-IP / X-Real-IP / X-Forwarded-For honrados.
# Em desenvolvimento local sem proxy, deixar em branco.
TRUSTED_PROXIES=
# Configurações de E-mail / SMTP Gmail (Autenticação 2FA — Provedor Ativo)
# ==============================================================================
# IMPORTANTE: MAIL_PASSWORD DEVE SER UMA SENHA DE APP DO GOOGLE.
# Nunca use a senha normal da conta Gmail.
# Gerar senha de app em: https://myaccount.google.com/apppasswords
# ==============================================================================
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_SMTP_AUTH=true
MAIL_SMTP_STARTTLS=true
MAIL_USERNAME=conta-dedicada@gmail.com
MAIL_PASSWORD=xxxx_xxxx_xxxx_xxxx
MAIL_FROM=conta-dedicada@gmail.com
# Timeouts SMTP do 2FA em milissegundos (opcionais — defaults: 15000 / 25000 / 25000)
# MAIL_CONNECTION_TIMEOUT=15000
# MAIL_READ_TIMEOUT=25000
# MAIL_WRITE_TIMEOUT=25000