Docker container deployment workspace for Threeal bot.
- Follow this guide to install Docker Engine.
As an alternative, you may deploy this project on the cloud using Heroku with the configurations that have been provided.
- Build a Docker image using Docker Engine.
$ docker build -t threeal-bot:latest .As an alternative, you may change the
threeal-bot:latestargument with any Docker image name that you desire. - Create a
.envfile that contains the following environment variables configuration:- (required)
BOT_TOKEN, fill it with the access token of your Discord's bot (more info here). - (required)
DB_URI, fill it with the URI of your MongoDB's server (more info here). - (required)
PORT, fill it with the port of the HTTP server. NLU_URL, fill it with the URL of your NLU API server. If not provided, the NLU API server will be run locally in this container.BOT_REPO, fill it with the repo's URL of the custom bot module. If provided, the container will rebuild the bot module project using the contents of that repo.BOT_REPO_BRANCH, an additional option forBOT_REPOthat provides the name of the branch that will be used.NLU_REPO, fill it with the repo's URL of the custom NLU module. If provided, the container will rebuild the NLU module project using the contents of that repo.NLU_REPO_BRANCH, an additional option forNLU_REPOthat provides the name of the branch that will be used.
- (required)
- Run a container using the Docker image that has been build.
$ docker run --rm --env-file .env --expose "$PORT" threeal-bot:latestReplace
"$PORT"with the same value as the$PORTenvironment variable in the.envfile.