mirror of
https://github.com/marcogll/telegram_new_socias.git
synced 2026-01-13 21:25:16 +00:00
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.
31 lines
628 B
YAML
31 lines
628 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
bot:
|
|
build: .
|
|
container_name: vanessa_bot
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- DATABASE_URL=mysql+mysqlconnector://${MYSQL_USER}:${MYSQL_PASSWORD}@db:3306/${MYSQL_DATABASE}
|
|
depends_on:
|
|
- db
|
|
volumes:
|
|
- .:/app
|
|
|
|
db:
|
|
image: mysql:8.0
|
|
container_name: vanessa_db
|
|
restart: always
|
|
environment:
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
MYSQL_USER: ${MYSQL_USER}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
|
|
volumes:
|
|
mysql_data:
|