Run on Docker
To function properly, Bastion needs to following at the bare minimum:
- Bot Token
- Owner ID
- MongoDB Connection URI
You can get these from the
The following example will run Bastion with a container name of
#!and will be
Watching for commands.
docker run -d --name=Bastion -e P_PREFIX='#!' -e A_TYPE='WATCHING' -e A_NAME='for commands' -e P_OWNER_ID='primary owner id' -e TOKEN='token' -e DB='mongodb+srv://' joshj23/bastionbot
Each config option is added using
For example, to add a second Owner ID, you would add
If you need more than 2 prefixes, owner ID's or cron jobs you will need to use config files.
If you need to (or want to) use config files, you can skip over ENV's entirely.
make sure you have an empty directory for Bastion's settings files, and download both the
configurations.example.yamland rename them to
configurations.yamlrespectively, and move them into said directory.
You want to bind mount the aforementioned settings directory to the containers
/usr/src/Bastion/filesdirectory. if you try to mount directly to
/usr/src/Bastion/settingsyour values will most likely be overriden during container boot.
$ docker run -d --name=Bastion --mount type=bind,source=/home/$USER/bastion_settings,target=/usr/src/Bastion/files joshj23/bastionbot
You may with to check the container logs to make sure the bot started correctly.
If all went well, bastion should now be online and responding to commands in your server.
Check the config files if you are unsure what links where