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:
@@ -8,7 +8,7 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DATABASE_URL=mysql+mysqlconnector://user:password@db:3306/vanessa_logs
|
||||
- DATABASE_URL=mysql+mysqlconnector://${MYSQL_USER}:${MYSQL_PASSWORD}@db:3306/${MYSQL_DATABASE}
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
@@ -19,14 +19,12 @@ services:
|
||||
container_name: vanessa_db
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_DATABASE: vanessa_logs
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||
MYSQL_USER: ${MYSQL_USER}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
|
||||
Reference in New Issue
Block a user