This script streamlines the deployment process for services using Docker Compose by automatically generating environment variables and a deployment script. It's designed to cater to the needs of Telegram bot development, ensuring a smooth setup experience.
- Automatically generates environment variables for MariaDB (MySQL) or PostgreSQL databases, with MariaDB (MySQL) as the default option.
- Constructs a comprehensive deployment script for services, utilizing Docker Compose for seamless integration.
- Python 3.x installed on your system.
- Docker and Docker Compose installed and configured.
- Clone the Repository: Start by cloning this repository to your local machine.
git clone https://github.com/Lacolle87/TeleDeployGenerator.git
- Navigate to the Project Directory: Change your current directory to the cloned repository.
cd TeleDeployGenerator
- Prepare the Script: Make the script executable and move it to a directory in your PATH for easy access.
chmod +x main.py
sudo cp main.py /usr/local/bin/initbot
- Generate Environment Variables: Run the script. MariaDB (MySQL) is the default database option. If you prefer PostgreSQL, include the
-p
flag.
initbot -p # For PostgreSQL
or simply
initbot # For MariaDB (MySQL)
-
Follow the Prompts: The script will guide you through entering the required information. Upon completion, it generates the necessary environment variable files and a deployment script named
deploy_services.sh
. -
Deploy Your Services: Execute the generated deployment script to start your services.
bash deploy_services.sh
This process automates the initial setup, allowing you to focus on developing and deploying your Telegram bot with ease.