Note for Windows: This was tested on powershell which works properly.
- Create an account on Supabase.
- Create two projects:
- Etourne Production
- Etourne Development
- Create an account on Doppler. This is going to be used for storing
.env
secrets (most of them). - Create a project in your Doppler account and setup
PROD
andDEV
environments. Follow this tutorial if you are stuck. - Create a project in Doppler.
- Secrets required (for both the environments) are:
- COMMAND_ID:
TEST_COMMAND_IDS
(DEV) orORIGINAL_COMMAND_IDS
(PROD) - DISCORD_CLIENT_ID:
your Discord BOT client ID (can be found on Discord Dev portal)
- DISCORD_CLIENT_SECRET:
your Discord BOT client secret (can be found on Discord Dev portal)
- DISCORDJS_BOT_TOKEN:
your Discord BOT token (can be found on Discord Dev portal)
- GUILD_ID:
Discord server you are adding the bot in for testing the commands
(only for DEV) - OWNER_ID:
your Discord User ID
- PREFIX:
prefix to use legacy command(s)
- SUPABASE_ANON_KEY:
Can be found from your Supabase project settings
- SUPABASE_SERVICE_ROLE_KEY:
Can be found from your Supabase project settings
- SUPABASE_URL:
Can be found from your Supabase project settings
- COMMAND_ID:
- Install Doppler CLI on your machine from here.
- Login into your Doppler account from CLI using
doppler login
. Follow the steps on your terminal. - Windows BUG with scoop: Scoop needs to be added to the system user variable so that you can use scoop and the installed apps. Read this GitHub issue to learn more.
- Make sure to have NodeJS (v16.14.0 and above) and nodemon installed.
- Go to
etourne
directory and setup your doppler project locally usingdoppler setup
.
-
Make sure you have followed all the steps in prerequisites.
-
Clone the repo
-
Create
logs
folder in the root directory as well as two files inside it:restart.txt
err_logs.txt
-
Install all the packages using:
npm install
. -
To start the bot, run:
npm run dev-doppler
(make sure to be in the directory).
- Make sure you have followed all the steps in prerequisites.
- Clone the repo.
- Create
logs
folder in the root directory as well as two files inside it:restart.txt
err_logs.txt
- Install all the packages using:
npm install
. - To start the bot, run:
pm2 start bin/etourne-bot.sh
. Make sure to setup PM2 beforehand.
Supabase provides in-depth explanation about self hosting on their website. Below is the summary of what needs to be done with this app:
- Create an account on Doppler. This is going to be used for storing
.env
secrets (most of them). - Create a project in Doppler.
- Generate JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY and POSTGRES_PASSWORD using the generator in Supabase.
- Hardcode the ANON_KEY and SERVICE_ROLE_KEY in
volumes/api/kong.yml
(for now). - Put them in the PROD of your project in Doppler dashboard.
- Install Doppler CLI by following this guide/documentation.
- Login into your Doppler account from CLI using
doppler login
. Follow the steps on your terminal. - Go to
supabase/docker
directory and setup your doppler project locally usingdoppler setup
. - Install Docker to your server/machine by following this guide/documentation (or this if you are on server).
- Setup Doppler project in your local machine by following this instruction.
- Run the following command to spin up Supabase:
doppler run -- docker compose up -d
.