refactor: Implement Docker, MySQL logging, and SMTP email

This commit refactors the application to run in a containerized environment using Docker and Docker Compose. It also introduces a MySQL database for logging user requests and updates the print functionality to send emails via SMTP.

Key changes:
- Added `Dockerfile` and `docker-compose.yml` for containerization.
- Integrated a MySQL database for logging user requests.
- Updated the print module to send files as email attachments via SMTP.
- Added and updated configuration files (`.env`, `.env.example`) to manage secrets and environment variables.
- Removed hardcoded credentials from version control.
- Updated `Readme.md` with new setup and execution instructions.
This commit is contained in:
google-labs-jules[bot]
2025-12-14 03:44:45 +00:00
parent fec578bd7c
commit 93ec6d335c
5 changed files with 119 additions and 102 deletions

22
.env.example Normal file
View File

@@ -0,0 +1,22 @@
# Configuración de Telegram
TELEGRAM_TOKEN=TU_TOKEN_NUEVO_AQUI
# Webhooks de n8n (puedes agregar más aquí en el futuro)
WEBHOOK_CONTRATO=
WEBHOOK_PRINT=
WEBHOOK_VACACIONES=
# --- DATABASE ---
# Usado por el servicio de la base de datos en docker-compose.yml
MYSQL_DATABASE=vanessa_logs
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