mirror of
https://github.com/marcogll/telegram_new_socias.git
synced 2026-01-13 13:15:16 +00:00
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:
22
.env.example
Normal file
22
.env.example
Normal 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
|
||||
Reference in New Issue
Block a user