The deployment is organized with Docker Compose, allowing for simple and extended deployment options. The extended deployment includes Traefik for proxy support.
Before you proceed, ensure you have the following prerequisites:
- Docker and Docker Compose installed
- Git (if you intend to pull the source code from a Git repository)
- A Discord bot token acquired from the Discord Developer Portal
- Traefik proxy is set up and ready (optional).
The deployment relies on environment variables, which can be configured in the .env file.
ALIAS: Docker container name.HOST: Hostname for the API gateway (only usable withdocker-compose.traefik.yml).
If you intend to use Traefik for proxy support, make sure that Traefik is properly set up and the docker-compose.traefik.yml file is configured with the desired settings.
To deploy the app without Traefik and with the simple configuration, run:
docker-compose -f docker-compose.yml up -dTo deploy the app with Traefik for proxy support, use the docker-compose.traefik.yml file:
docker-compose -f docker-compose.yml -f docker-compose.traefik.yml up -dFor easy deployment and updates, you can use the build-and-deploy.sh script. This script reads the environment variables from the .env file and automates the build and deployment process. Run it as follows:
./build-and-deploy.shAlternatively, you can use the build-and-deploy.sh script with the "traefik" argument to trigger the extended deployment:
./build-and-deploy.sh traefik