-
mkvirtualenv mrbutler-bot -p $(which python3)
-
Edit
${VIRTUAL_ENV}/bin/postactivate
as following:#!/bin/bash # This hook is sourced after this virtualenv is activated. export MRB_DISCORD_TOKEN="YOUR DISCORD TOKEN HERE" export MRB_ENV="dev"
-
Edit
${VIRTUAL_ENV}/bin/postdeactivate
as follows:#!/bin/bash # This hook is sourced after this virtualenv is deactivated. unset MRB_DISCORD_TOKEN unset MRB_ENV
-
deactivate
andworkon mrbutler-bot
to load your environment variables -
pip install -r requirements-dev.txt
to install dev requirements. -
Once
pip
has installed everything correctly, you should run tests to confirm everything is working as expected. Runningmake test
will execute the entire testing suite inside thetest
docker container. -
You're all done! You can use
docker-compose up -d --build
to start the containers.
You can run the bot directly in your virtualenv
or you can use the container
that is built by docker-compose
. Both depend on those environment variables
you already setup, so you can switch back and forth with ease.
-
workon mrbutler-bot
-
python ./bot/bot.py
-
Ctrl-C
when done
-
workon mrbutler-bot
-
docker-compose up --build bot
- You can optionally add
-d
before--build
if you do not mind the container detaching from your session and willdocker-compose stop
it later on your own.
Ctrl-C
when done