Skip to content

setup docker env - #101

Open
S1nju wants to merge 2 commits into
galacticwarrior9:masterfrom
S1nju:master
Open

setup docker env#101
S1nju wants to merge 2 commits into
galacticwarrior9:masterfrom
S1nju:master

Conversation

@S1nju

@S1nju S1nju commented Aug 8, 2026

Copy link
Copy Markdown

This pull request adds Docker support for the project, enabling easy containerization and orchestration of the Python application and its MySQL database using Docker and Docker Compose. The main changes include the addition of a Dockerfile to build the application image and a docker-compose.yml file to define and manage the application and database services.

Dockerization:

  • Added a Dockerfile that sets up a Python 3.10 environment, installs dependencies from requirements.txt, and configures the container to run main.py with unbuffered output for real-time logging.

Service Orchestration:

  • Introduced a docker-compose.yml file that defines two services:
    • bot: Builds from the local context, mounts the config.ini file, and waits for the database to be healthy before starting.
    • db: Uses the official MySQL 8.0 image, sets up environment variables for database initialization, persists data with a Docker volume, and includes a healthcheck to ensure readiness before the bot starts.
    • Defines a shared volume db_data for persistent MySQL storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant