- Railway Account - connected to GitHub
- Discord Account
- GitHub Account - older than 30 days
Link your Discord account to Railway from account settings [REQUIRED]
Run the /beta
slash command in the Railway Discord Server
Create a new project, provisioned with the MySQL Plugin
Run Control/Command + K and select Metrofy
Fork this repo, we're gonna deploy it next
Select New Service and pick GitHub Repo, selecting your fork
Once the service has deployed (it may fail to build, that is ok), select it and go to Settings.
Rename the service if you would like and set the root directory to /api
OPTIONAL: FOR USERS WITH CUSTOM FORKS OF ZEPPELIN
Note: may not build, as patchfiles are based off of upstream
Create a variable name
GIT_REPO
and set it to the url to your custom fork of Zeppelin# Optional, for advanced users (replace with your custom fork) GIT_REPO=https://github.com/Dragory/ZeppelinBot.git
Create a variable named KEY
and set it to
32 random characters
# Example (don't use this):
KEY=eilegiluegoigefiugsdzdiuggfweaiug
Create a variable named STAFF
and set it to your Discord Snowflake
# Replace with your snowflake
STAFF=524722785302609941
Copy the following variables into the api service (tip: Bulk Import)
DB_PASSWORD=${{ MYSQLPASSWORD }}
DB_USER=${{ MYSQLUSER }}
DB_HOST=${{ MYSQLHOST }}
DB_PORT=${{ MYSQLPORT }}
DB_DATABASE=${{ MYSQLDATABASE }}
PROFILING=false
PORT=8800
OAUTH_CALLBACK_URL=https://${{ RAILWAY_STATIC_URL }}/auth/oauth-callback
These variables will require you to create a Discord Application
Go to the OAuth tab and copy these values
CLIENT_SECRET=<OAuth Client Secret>
CLIENT_ID=<OAuth Client ID>
Deploy your fork again by creating a new service, like you did for the api
Rename the service if you would like and set the root directory to /bot
Create the following variables
# Pick a root server to add the bot to
SERVER_NAME=<Server Name>
SERVER_ID=<Server Snowflake>
OWNER_ID=<Server Owners User Snowflake>
# General vars
ACCOUNT_ID=<Your User Snowflake (from api step)>
TOKEN=<Bot Token>
Clone your fork of this repo, make sure Node.js and Railway CLI are installed
Open a terminal and enter the init-db
folder
Run npm ci
to install deps
Run railway run node .
to set up the database, Control + C once it stops
logging (i'll fix it later ok)
Deploy your fork again by creating a new service, like you did for the bot
Rename the service if you would like and set the root directory to /dashboard
Create a variable named API_URL
and set it to the url Railway generated for
the api service
# Make sure there is no trailing slash
API_URL=https://example.up.railway.app
# Also add PORT
PORT=80
Go back to the api service and add a variable named DASHBOARD_URL
set to the
generated url for the dashboard
# Make sure there is no trailing slash
DASHBOARD_URL=https://example.up.railway.app
Go your bot's Discord Application
Under OAuth, add a callback url set to:
$API_URL + '/auth/oauth-callback'
EXAMPLE:
API_URL=https://example.up.railway.app
CALLBACK=https://example.up.railway.app/auth/oauth-callback