Locally running the bot is possible, so long as .env are set, requirements are installed and a postgres server running and accessible.
Clone the repository and move into the cloned folder.
git clone https://github.com/HarryLudemann/Discord-Bot
cd Discord-Bot
Create .env file in folder to store environment variables, set the following variables.
BOT_TOKEN=
POSTGRES_HOST=
POSTGRES_DATABASE=postgres
POSTGRES_USER=
POSTGRES_PASSWORD=
pip install -r requirements.txt
python start.py
Install the postgres alpine version from docker hub, then run the following command.
docker run --name postgres -e POSTGRES_USER=username -e POSTGRES_PASSWORD=pw -d -p 5432:5432 postgres:alpine
Clone the repository and move into the cloned folder.
git clone https://github.com/HarryLudemann/Discord-Bot
cd Discord-Bot
Create .env file in folder to store environment variables, set the following.
BOT_TOKEN=
POSTGRES_HOST=
POSTGRES_DATABASE=postgres
POSTGRES_USER=
POSTGRES_PASSWORD=
Build and run the Discord bot with following commands.
docker build --tag discord-py .
docker run --name discord-py discord-py
Run the following commands to build a docker image from project.
docker build --tag discord-py .
docker tag discord-py harryludemann/discord-py
docker push harryludemann/discord-py
docker run --name discord-py discord-py