-
Notifications
You must be signed in to change notification settings - Fork 36
Build & Installation
Alexander Smirnov edited this page Mar 7, 2022
·
50 revisions
You can get precompiled ThunderED versions from:
- App release on GitHub
- Docker image You can also manually compile .NET core source code for different platforms.
Tip: we have config editor to help with the setup available from GitHub releases. Go to How to get all required data for settings page to find out what settings you have to set.
- Create Discord bot and CCP app. (Look here for a guide.)
- Setup MySQL database (or skip it and use default SQLite out of the box)
- Install and access MySQL server
- Deploy mysql.dump provided with release or within source code root folder
- Make sure that MySQL is allowed to receive external connections
- Don't forget to setup Database config file section later
- Obtain latest software release using the links above
- (Optional) Obtain static IP or domain name for your server or web authentication will not work. CCP app requires callback address which is your machine/server address. It should be possible to access you machine from the internet to send auth data. This can require some port forwarding setup on the router or hosting.
- Create and setup settings.json config file based on the settings.def.json file included in the package. You can use config editor for this (mentioned above). Read description of different config parameters
- Run THDWebServer.exe
- Install Docker for Linux. It will pull .NET Core from the image.
- Install Docker:
sh <(curl -fsSL get.docker.com)
- Download docker-compose:
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- Make docker-compose executable:
chmod +x /usr/local/bin/docker-compose
- Install Docker:
- Build from source code or install pre-compiled version
- 2A. Get source code and prepare the package using the following commands as an example:
- Download source code from Git:
git clone https://github.com/panthernet/ThunderED
- Go to your bot folder:
cd ThunderED/ThunderED
- Create settingsfile from default
cp settings.def.json settings.json
and edit it to your needs (or use Windows config editor and copy result file into Linux). Read description of different config parameters - Go one folder up
cd ..
- Build from source code:
docker build -t thundered .
- Your docker container name will be:
thundered:latest
- Download source code from Git:
- 2B. Pull latest pre-compiled version.
- Run
docker pull panthernet/thundered
- Your docker container name will be:
panthernet/thundered:latest
- Run
- Create static data directories
/opt/thdwebserver
and/opt/thdwebserver/CustomAssets
on your host. Copy settings.json into newly created data directory. Static directory will be used to store sensitive data which might need to persist between updates or easily accessed by bot admin. This data includes: settings.json, edb.db, _simplifiedAuth.txt, shipdata.json, custom_language.json, Templates/Messages/*.* and Logs directory. Database file namededb.db
will be created in this folder automatically if you use SQLite database (default). - Run bot in the mode you like:
- In the background:
- For 2A:
docker run -d -p 8000:8000 -v /opt/thdwebserver:/app/ThunderED/Data -v /opt/thdwebserver/CustomAssets:/app/ThunderED/wwwroot/CustomAssetsMap CONTAINER_NAME
- For 2B:
docker run -d -p 8000:8000 -v /opt/thdwebserver:/app/Data -v /opt/thdwebserver/CustomAssets:/app/wwwroot/CustomAssetsMap CONTAINER_NAME
- For 2A:
- Debug:
- For 2A:
docker run -p 8000:8000 -v /opt/thdwebserver:/app/ThunderED/Data -v /opt/thdwebserver/CustomAssets:/app/ThunderED/wwwroot/CustomAssetsMap CONTAINER_NAME
- For 2B:
docker run -p 8000:8000 -v /opt/thdwebserver:/app/Data -v /opt/thdwebserver/CustomAssets:/app/wwwroot/CustomAssetsMap CONTAINER_NAME
- For 2A:
- CONTAINER_NAME - name of the container from either 2A. or 2B. section
- In the background:
WARNING: If you use Digital Ocean hosting please use search on #general channel on our Discord to solve possible IP/Port issues. In short: with DO you should add firewall rule to accept port 8000 as all ports there are closed by default.
Note: Logs directory will also be located in static data directory (e.g. /opt/thdwebserver)