Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.22 KB

DOCKER.md

File metadata and controls

48 lines (35 loc) · 1.22 KB

Docker Support

SpellBot can be run directly from docker so that you don't have to worry about installing anything or managing your environment.

Database

You can quickly get a PostgreSQL Database running locally with docker:

docker run -i --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:15

You should then be able to connect to this database using psql:

psql -h localhost -p 5432 -U postgres

SpellBot

Either pull the latest image from the registry:

docker pull lexicalunit/spellbot

Or build it yourself:

docker build -t spellbot .

Now you can run SpellBot via docker run. You should pass your configuration into the process via environment variables:

docker run -it --rm -p 8080:80 \
    -e HOST="0.0.0.0" \
    -e PORT="80" \
    -e DATABASE_URL="postgresql://postgres@host.docker.internal:5432/postgres" \
    -e API_BASE_URL="http://localhost:8080" \
    -e DD_TRACE_ENABLED="false" \
    -e BOT_TOKEN="<Your Discord provided bot token>" \
    -e SPELLTABLE_AUTH_KEY="<Your SpellTable API auth token>" \
    -e DEBUG_GUILD="<optional: Debug guild id to use>" \
    <lexicalunit/spellbot (pulled from registry) or spellbot (built locally)>