-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy
Deploy is the process we actually go run in an environment, that can be local, container based or shared environment. Here's all the things you need to know about the deployment process,
On Linux, for most of the cases, modern Linux distros comes with python
and git
preinstalled, or can be installed right from the official repository without much of a hassle. It is recommended to use the latest package as much as possible.
Clone the Ciraag
Repository! Open your terminal and run the following command to clone the Ciraag repository:
git clone https://github.com/iniridwanul/Ciraag
But it's recommend to fork the repository if you want to help building with us! And a star is much appreciated!
Then navigate to the Ciraag Directory. Change your current directory to the Ciraag folder:
cd Ciraag
You will find a .env.sample
file, for the reference of a .env
file, as well as in the wiki. You can create one by executing
cd .env.sample .env
Afterwards, you must fill it up!
Creating a virtual environment is as easy as running,
python -m venv venv
Activate the virtual environment with,
source venv/bin/activate
Install required python dependencies, in this way,
pip install -r requirements.txt
Finally, run the following command to start your own Ciraag
,
bash start.sh
Ciraag
will initialize and connect to Telegram automatically.
On Windows, Python and Git may not come preinstalled. Make sure you install them before proceeding. It's recommended to use the latest version of both.
-
Install Python:
Download the latest version of Python from the [official website](https://www.python.org/downloads/) and install it. During installation, make sure to check the box that says "Add Python to PATH". -
Install Git:
Download Git from [git-scm.com](https://git-scm.com/) and install it. During installation, select "Use Git from the command line and also from 3rd-party software" when prompted.
Open the Command Prompt or PowerShell and run the following command to clone the Ciraag repository:
git clone https://github.com/iniridwanul/Ciraag
If you'd like to contribute to the project, consider forking the repository first. Contributions are always welcome, and a star on GitHub is much appreciated!
Change your current directory to the Ciraag
folder by running:
cd Ciraag
A .env.sample
file is provided as a reference. You need to create a .env
file based on it. Run the following command to copy the .env.sample
file to .env
:
copy .env.sample .env
Edit the
.env
file and fill in all the required environment variables. You can use any text editor to do this, such as Notepad or VS Code.
To isolate dependencies, create a virtual environment by running:
python -m venv venv
Activate the virtual environment with the following command:
venv\Scripts\activate
You should see (venv)
at the beginning of your command line, indicating that the virtual environment is active.
Install the required Python dependencies by running:
pip install -r requirements.txt
Since Windows doesn’t support Bash scripts like start.sh
, you need to manually set environment variables before running Ciraag
. Open the Command Prompt or PowerShell and run the following commands for each variable in your .env
file:
set VARIABLE_NAME=VALUE
For example, if your .env
contains:
BOT_TOKEN=your_bot_token
API_ID=123456
Run:
set BOT_TOKEN=your_bot_token
set API_ID=123456
Repeat this process for all variables in the .env
file.
Alternatively, you can permanently set environment variables using Windows Environment Variable settings.
With the virtual environment activated and environment variables set, start Ciraag
using:
python -m ciraag
Ciraag
will initialize and connect to Telegram automatically.
Warning
Deploying on windows is still not mature enough! In case you face some difficulities or errors, please contact with use. Above section is not fully tested. Feel free to contribute.
This Wiki is also distributed under GNU Affero General Public License v3.0. It's highly recommended to use the official wiki to avoid scam, paid server or any other issues.
-
1 - Wiki Home
-
2 - Prerequisites
-
3 - Deploy
- 3.1 - Deploy on Linux
- 3.2 - Deploy on Windows