78c732a002 | ||
---|---|---|
.yarn | ||
src | ||
.dockerignore | ||
.env.example | ||
.gitignore | ||
.prettierignore | ||
.sapphirerc.json | ||
.yarnrc.yml | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
docker-compose.yml | ||
package-lock.json | ||
package.json | ||
tsconfig.json | ||
yarn.lock |
README.md
Docker Sapphire Bot example
This is a basic setup of a Discord bot using the sapphire framework written in TypeScript containerized with Docker
How to use it?
Prerequisite
- Copy the
.env.example
and rename it to.env
, make sure to fill the Token. - Open the Dockerfile and in the block marked with
Conditional steps for end-users
make sure you enable the lines that apply to your project.
Development
Run docker-compose up
. This will start the bot in watch mode and automatically run it after each save.
It will build the Dockerfile
up until the development
stage.
Production
Just like in the development step, you have to fill in the .env
file and then run the following command to create a production image;
docker build . -t sapphire-sample-bot
To test if your image works, you can run:
docker run --env-file .env sapphire-sample-bot
License
Dedicated to the public domain via the Unlicense, courtesy of the Sapphire Community and its contributors.