- Run
./setupto clone down the devenv submodule and checkout latest commit. - Run
./initif this is the first time using this repo (this creates the docker compose file). - Edit the
./docker-compose.ymlfile to set the root database password, and user and password to use for the application. - For subsequent uses, run
./upto bring up the containers. - Create a
.envfile in the./code/directory, using.env.distas a template, and setting the correct values for your discord bot. - After starting the containers for the first time, run
./connectto connect to the app container and go to the/appdirectory, then runnpm install. - Run
npm run updateto install the database tables. - The first time you run the bot, you will want to use
npm run devas that will register the commands (also use that if you make any code changes and add/remove commands). - Otherwise, you can use
npm start - If you want to run the bot in the background using a script manager, you can instead use the script
./src/gowhich will install and run viapm2.
Other helpful commands:
./connect <name> will connect to the docker container specified, or the project's -<type> container by default.
./stop will bring down all the project containers.
./destroy will bring down and delete all the project containers and networks.
npm run register -- purge will delete all commands from the servers the bot is on (unless ENV=dev, then just your test server/guild)
npm run register will create all the commands again in all servers the bot is on (unless ENV=dev, then just your test server/guild)
- This has only been tested on Ubuntu 20.04
dockeranddocker-composemust be installed:/bin/bash -c "$(curl -fsSL https://git.io/JDGfm)"or install it manually if you so wishjqmodule must be installed:apt install jq