Files
telegram_new_socias/.env.example
google-labs-jules[bot] 4e2b6335a6 feat: Implement multi-database architecture
This commit introduces a three-database architecture to the application,
as specified in the `db_logic.md` file.

The changes include:
- A SQL initialization script (`db/init/init.sql`) to create the
  `USERS_ALMA`, `vanity_hr`, and `vanity_attendance` databases and their
  respective tables.
- SQLAlchemy models for all tables, organized into separate files
  within the `models` directory.
- Refactoring of the database connection logic in `modules/database.py`
  to support connections to all three databases.
- Creation of a `modules/logger.py` to handle request logging to the
  `USERS_ALMA` database.
- Updates to `docker-compose.yml` to mount the initialization script and
  build the bot image locally.
- Updates to `.env.example` to include the new database environment
  variables.
- Restoration of the data dictionary to `db_tasks.md`.
2025-12-18 19:36:40 +00:00

50 lines
1.6 KiB
Plaintext

# Configuración de Telegram
TELEGRAM_TOKEN=TU_TOKEN_NUEVO_AQUI
TELEGRAM_ADMIN_CHAT_ID=TELEGRAM_ADMIN_CHAT_ID
OPENAI_API_KEY=SK......
GOOGLE_API_KEY=AIzaSyBqH5...
# URL de la hoja de cálculo de Google para verificar duplicados
GOOGLE_SHEET_URL=https://docs.google.com/spreadsheets/d/1iVHnNoAF4sVVhb2kcclthznYFUKetmhsM6b2ZUCXd-0/edit?gid=370216950#gid=370216950
# Opcional: Credenciales de Google como variables de entorno
# Si estas variables están definidas, se usarán en lugar del archivo JSON.
# Asegúrate de escapar correctamente el valor de GSA_PRIVATE_KEY (ej. reemplazando saltos de línea con \n)
GSA_TYPE=service_account
GSA_PROJECT_ID=
GSA_PRIVATE_KEY_ID=
GSA_PRIVATE_KEY=
GSA_CLIENT_EMAIL=
GSA_CLIENT_ID=
GSA_AUTH_URI=
GSA_TOKEN_URI=
GSA_AUTH_PROVIDER_X509_CERT_URL=
GSA_CLIENT_X509_CERT_URL=
# Webhooks de n8n (puedes agregar más aquí en el futuro)
# Usa WEBHOOK_ONBOARDING (o el alias WEBHOOK_CONTRATO si ya lo tienes así)
WEBHOOK_ONBOARDING=url
# WEBHOOK_CONTRATO=url
WEBHOOK_PRINT=url
WEBHOOK_VACACIONES=url
WEBHOOK_PERMISOS=url
# --- DATABASE ---
# Usado por el servicio de la base de datos en docker-compose.yml
MYSQL_DATABASE_USERS_ALMA=USERS_ALMA
MYSQL_DATABASE_VANITY_HR=vanity_hr
MYSQL_DATABASE_VANITY_ATTENDANCE=vanity_attendance
MYSQL_USER=user
MYSQL_PASSWORD=password
MYSQL_ROOT_PASSWORD=rootpassword
# --- SMTP ---
# Usado por el módulo de impresión para enviar correos
SMTP_SERVER=smtp.hostinger.com
SMTP_PORT=465
SMTP_USER=your_email@example.com
SMTP_PASSWORD=your_password
SMTP_RECIPIENT=your_email@example.com # También se acepta PRINTER_EMAIL como alias
GOOGLE_CREDENTIALS_FILE=google_credentials.json