Skip to content

2. Getting involved with Development

Xarlos edited this page Nov 24, 2023 · 10 revisions

The Practical Python Organization

Cloning the project

To clone Zorak onto your local machine, use the command:

git clone https://github.com/practical-python-org/ZorakBot.git

A folder called ZorakBot will be added to the directory you are currently in, and all the project files will be added in it.

Setting up your environment

The bot is deployed using docker. Create an .env file from '.env.example'. Docker will use these env variables to spin up your instance of Zorak. Replace the DISCORD_TOKEN env variable with your discord bot token.

Running Zorak-Bot

Development / testing

The easiest way to get started is to run Zorak locally and in our test server (Contact a repo admin for an invite!).

-ssp: Variable that sets the location to the server settings to use. -dd: Flag that allows you to drop the database. -cl: Flag that enables streaming logs to console.

docker-compose up -d

And then after making a change, rebuild only the zorak container.

docker build -t zorak . docker run --env-file ./.env zorak -dd True -dt <DISCORD_TOKEN_HERE>

Production

All environment settings are found in your .env file.

Update the .env file to use 'prod' as the ENVIRONMENT Update your .env file to point the SETTINGS variable to Resources/ServerConfig/PracticalPython Run the command: docker-compose up -d

FAQ

Clone this wiki locally