Note
Along with the ETS2LA C# rewrite this backend will be rewritten. The code quality is fine but there's still a lot of improvement to do. We thought a full rewrite to add new features would work better than trying to wrestle the current version to a state we're happy with.
ETS2LA Backend server code.
add a .env file in the root directory with the following content:
CLIENT_ID=your_discord_client_id
CLIENT_SECRET=your_discord_client_secret
ENCRYPTION_KEY=enctyption_key_for_tokens
CRASH_WEBHOOK=discord_webhook_url_for_crash_reports
FEEDBACK_WEBHOOK=discord_webhook_url_for_feedback
KOFI_WEBHOOK=discord_webhook_url_for_kofi_notifications
KOFI_SECRET=kofi_secret_for_donations
Then run the following commands:
pip install -r requirements.txt
python main.py
Alternatively use docker:
docker compose up
CLIENT_IDandCLIENT_SECRETare the credentials for a Discord application.ENCRYPTION_KEYis a key used to encrypt and decrypt the user's Discord ID and various other sensitive data.CRASH_WEBHOOK,FEEDBACK_WEBHOOKandKOFI_WEBHOOKare for Discord notifications.KOFI_SECRETis to ensure we're receiving the correct Kofi user's notifications.
Note that the webhooks are optional, you don't have to assign a value to them (ensure they are present in the file though).