-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
287 lines (228 loc) · 11.7 KB
/
Copy path.env.example
File metadata and controls
287 lines (228 loc) · 11.7 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# =============================================================================
# CapyVagas - Environment Variables Configuration
# =============================================================================
# This file contains all environment variables used by the application.
# Each variable includes a description, impact, Docker Secrets note where applicable.
#
# Docker Secrets: Sensitive variables (passwords, API keys, secret keys) should
# be stored in the secrets/ directory or mounted at /run/secrets/
# See secrets/README.md for instructions on how to set them up.
# =============================================================================
# =============================================================================
# Django Settings
# =============================================================================
# Basic Django configuration for the web application.
# DJANGO_SECRET_KEY: Secret key for Django sessions and signing
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: django_secret_key
# Example: DJANGO_SECRET_KEY=your-secret-key-here
DJANGO_SECRET_KEY=sua_chave_secreta_aqui
# DEBUG: Enable/disable debug mode
# Impact: When True, detailed error pages are shown. Never enable in production!
# Example: DEBUG=False
DEBUG=False
# ALLOWED_HOSTS: Comma-separated list of allowed hostnames
# Impact: Required for security; controls which hosts can access the application
# Production: ALLOWED_HOSTS=chat-universitario.sh.utfpr.edu.br,backend
# Example: ALLOWED_HOSTS=localhost,127.0.0.1,capyvagas.example.com
ALLOWED_HOSTS=localhost,127.0.0.1,capyvagas.example.com
# DOMAIN: Primary domain for the application
# Impact: Used for generating absolute URLs in emails and API responses
# Production: DOMAIN=chat-universitario.sh.utfpr.edu.br
# Example: DOMAIN=capyvagas.example.com
DOMAIN=capyvagas.example.com
# PORTAL_BASE_URL: Full URL for the portal (with protocol and port)
# Used for generating links in notifications and emails
# Example: PORTAL_BASE_URL=http://localhost:8000
PORTAL_BASE_URL=http://localhost:8000
# =============================================================================
# Database Configuration (PostgreSQL)
# =============================================================================
# Configuration for PostgreSQL database connection.
# Sensitive data should use Docker Secrets for enhanced security.
# POSTGRES_DB: Name of the PostgreSQL database
# Example: POSTGRES_DB=capyvagas
POSTGRES_DB=capyvagas
# POSTGRES_USER: PostgreSQL database username
# Example: POSTGRES_USER=capyvagas_user
POSTGRES_USER=capyvagas_user
# POSTGRES_HOST: PostgreSQL server hostname
# Example: POSTGRES_HOST=db
POSTGRES_HOST=db
# POSTGRES_PORT: PostgreSQL server port
# Example: POSTGRES_PORT=5432
POSTGRES_PORT=5432
# POSTGRES_PASSWORD: PostgreSQL database password
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: postgres_password (mounted at /run/secrets/postgres_password)
# Example: POSTGRES_PASSWORD=your_password_here
# POSTGRES_PASSWORD is read from /run/secrets/postgres_password
# =============================================================================
# Redis Configuration
# =============================================================================
# Configuration for Redis cache/broker.
# REDIS_URL: Redis connection URL
# Format: redis://[:password@]host[:port][/database]
# Example: REDIS_URL=redis://redis:6379/0
REDIS_URL=redis://redis:6379/0
# =============================================================================
# WAHA Configuration (WhatsApp HTTP API)
# =============================================================================
# Configuration for WAHA (WhatsApp HTTP API) integration.
# WAHA_URL: Base URL of the WAHA server
# Example: WAHA_URL=http://waha:3000
WAHA_URL=http://waha:3000
# WAHA_SESSION_NAME: WAHA session identifier
# Each session represents a different WhatsApp account
# Example: WAHA_SESSION_NAME=default
WAHA_SESSION_NAME=default
# WAHA_TIMEOUT_SECONDS: Timeout for WAHA API requests
# Example: WAHA_TIMEOUT_SECONDS=5
WAHA_TIMEOUT_SECONDS=5
# WAHA_API_KEY: API key for WAHA authentication
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: waha_api_key
# Example: WAHA_API_KEY=your_api_key_here
WAHA_API_KEY=sua_api_key_aqui
# =============================================================================
# WAHA Dashboard Configuration
# =============================================================================
# Credentials for WAHA's built-in web dashboard.
# Access at: http://waha:3000/dashboard
# WAHA_DASHBOARD_USERNAME: Username for WAHA dashboard login
# Example: WAHA_DASHBOARD_USERNAME=admin
WAHA_DASHBOARD_USERNAME=seu_usuario_aqui
# WAHA_DASHBOARD_PASSWORD: Password for WAHA dashboard login
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: waha_dashboard_password
# Example: WAHA_DASHBOARD_PASSWORD=your_password_here
WAHA_DASHBOARD_PASSWORD=sua_senha_aqui
# =============================================================================
# WAHA Swagger Documentation
# =============================================================================
# Credentials for WAHA's Swagger API documentation.
# Access at: http://waha:3000/apiDocs
# WHATSAPP_SWAGGER_USERNAME: Username for Swagger UI login
# Example: WHATSAPP_SWAGGER_USERNAME=swagger
WHATSAPP_SWAGGER_USERNAME=swagger
# WHATSAPP_SWAGGER_PASSWORD: Password for Swagger UI login
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: whatsapp_swagger_password
# Example: WHATSAPP_SWAGGER_PASSWORD=your_password_here
WHATSAPP_SWAGGER_PASSWORD=sua_senha_aqui
# =============================================================================
# Bot Dashboard Configuration
# =============================================================================
# Credentials for the CapyVagas bot control panel (Django admin).
# BOT_DASHBOARD_USERNAME: Username for bot dashboard login
# Example: BOT_DASHBOARD_USERNAME=admin
BOT_DASHBOARD_USERNAME=seu_usuario_aqui
# BOT_DASHBOARD_PASSWORD: Password for bot dashboard login
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: bot_dashboard_password
# Example: BOT_DASHBOARD_PASSWORD=your_password_here
BOT_DASHBOARD_PASSWORD=sua_senha_aqui
# =============================================================================
# Django Admin Configuration
# =============================================================================
# Credentials for Django admin panel (accessible at /admin).
# DJANGO_ADMIN_USERNAME: Username for Django admin login
# Example: DJANGO_ADMIN_USERNAME=admin
DJANGO_ADMIN_USERNAME=seu_usuario_aqui
# DJANGO_ADMIN_PASSWORD: Password for Django admin login
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: django_admin_password
# Example: DJANGO_ADMIN_PASSWORD=your_password_here
DJANGO_ADMIN_PASSWORD=sua_senha_aqui
# =============================================================================
# Email Configuration
# =============================================================================
# Configuration for email sending.
#
# IMPORTANT: There are TWO email paths:
# 1. EMAIL_PROVIDER: Controls the bot's custom email service (confirmation emails,
# alerts). This is what sends registration confirmation emails via WhatsApp bot.
# Options: "ses" (AWS SES via Django backend), "resend" (Resend API), "smtp", "console"
# 2. EMAIL_BACKEND: Controls Django's built-in email (allauth signup, password reset).
# Automatically set to SES when AWS credentials are present.
#
# In production, EMAIL_PROVIDER must be set to "ses" (or "resend") for emails to be delivered.
# Default is "console" which only writes to container logs — emails are NEVER delivered.
# EMAIL_PROVIDER: Bot email service provider
# Options: "brevo" (Brevo/Sendinblue API), "ses" (AWS SES), "resend" (Resend API), "smtp", "console" (dev only!)
# Production recomendado: "brevo" (300 emails/dia gratis, nao exige dominio verificado)
# Example: EMAIL_PROVIDER=brevo
EMAIL_PROVIDER=brevo
# EMAIL_FALLBACK_PROVIDER: Fallback provider if primary fails
# Options: same as EMAIL_PROVIDER, or empty string for no fallback
# Example: EMAIL_FALLBACK_PROVIDER=console
EMAIL_FALLBACK_PROVIDER=
# RESEND_API_KEY: API key for Resend email service (required if EMAIL_PROVIDER=resend)
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: resend_api_key
# Example: RESEND_API_KEY=re_your_api_key_here
# RESEND_API_KEY is read from /run/secrets/resend_api_key
# BREVO_API_KEY: API key for Brevo (ex-Sendinblue) (required if EMAIL_PROVIDER=brevo)
# IMPORTANT: Use Docker Secrets in production! Nao commite a chave.
# Docker Secret name: brevo_api_key (arquivo secrets/brevo_api_key.txt)
# Obter em: https://app.brevo.com/settings/keys/api
# Example: BREVO_API_KEY=xkeysib-xxx-yyy
# BREVO_API_KEY is read from /run/secrets/brevo_api_key
# EMAIL_BACKEND: Django email backend (allauth, password reset)
# Options:
# - django.core.mail.backends.console.EmailBackend (prints to terminal - dev)
# - django_ses.SESBackend (production - auto-selected when AWS creds present)
# - django.core.mail.backends.smtp.EmailBackend (production SMTP)
# In production with AWS credentials, this is automatically set to django_ses.SESBackend.
# Example: EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
# EMAIL_HOST: SMTP server hostname (used when EMAIL_PROVIDER=smtp or EMAIL_BACKEND=smtp)
# Example: EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
# EMAIL_PORT: SMTP server port
# Common ports: 587 (TLS), 465 (SSL)
# Example: EMAIL_PORT=587
EMAIL_PORT=587
# EMAIL_USE_TLS: Enable TLS/SSL for SMTP connection
# Example: EMAIL_USE_TLS=True
EMAIL_USE_TLS=True
# EMAIL_HOST_USER: SMTP username
# Example: EMAIL_HOST_USER=your_smtp_username
EMAIL_HOST_USER=seu_smtp_username_aqui
# EMAIL_HOST_PASSWORD: SMTP password
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: email_password
# Example: EMAIL_HOST_PASSWORD=your_password_here
# EMAIL_HOST_PASSWORD is read from /run/secrets/email_password
# DEFAULT_FROM_EMAIL: Default sender email address (must be verified in SES/Resend)
# Example: DEFAULT_FROM_EMAIL=noreply@capyvagas.example.com
DEFAULT_FROM_EMAIL=seu_email_aqui@example.com
# ALERT_EMAIL: Recipient for operational alerts (bot offline, backup failures)
# Falls back to DEFAULT_FROM_EMAIL when unset
# Example: ALERT_EMAIL=admin@example.com
ALERT_EMAIL=
# =============================================================================
# AWS Configuration
# =============================================================================
# Configuration for AWS services (SES for email, etc.).
# AWS_ACCESS_KEY_ID: AWS IAM access key
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: aws_access_key_id
# Example: AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_ACCESS_KEY_ID=sua_access_key_aqui
# AWS_SECRET_ACCESS_KEY: AWS IAM secret key
# IMPORTANT: Use Docker Secrets in production!
# Docker Secret name: aws_secret_access_key
# Example: AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_SECRET_ACCESS_KEY=sua_secret_key_aqui
# AWS_DEFAULT_REGION: Default AWS region
# Example: AWS_DEFAULT_REGION=us-east-1
AWS_DEFAULT_REGION=us-east-1
# =============================================================================
# Security Notes
# =============================================================================
# - All production passwords, API keys, and secret keys should be stored as Docker Secrets
# - Create secrets files in the secrets/ directory and ensure they're mounted
# - Never commit actual credentials to version control
# - Use different credentials for each environment (dev, staging, prod)
# - Rotate credentials periodically (recommended: every 90 days)