allow changing api url

This commit is contained in:
janderedev 2022-04-30 11:25:24 +02:00
parent c913267f02
commit 55504e3071
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A
3 changed files with 8 additions and 1 deletions

View file

@ -10,6 +10,10 @@
# after initializing the database. # after initializing the database.
DB_PASS= DB_PASS=
# Base URL of the Revolt API to connect to.
# Defaults to https://api.revolt.chat
API_URL=
# Your bot account's token. # Your bot account's token.
BOT_TOKEN= BOT_TOKEN=

View file

@ -21,7 +21,8 @@ let client = new AutomodClient({
// pongTimeout: 10, // pongTimeout: 10,
// onPongTimeout: 'RECONNECT', // onPongTimeout: 'RECONNECT',
fixReplyCrash: true, fixReplyCrash: true,
messageTimeoutFix: true messageTimeoutFix: true,
apiURL: process.env.API_URL,
}, db); }, db);
login(client); login(client);

View file

@ -23,6 +23,7 @@ services:
- BOT_METRICS_MSG_PING_CHANNEL - BOT_METRICS_MSG_PING_CHANNEL
- BOT_STATUS - BOT_STATUS
- BOT_STATUS_INTERVAL - BOT_STATUS_INTERVAL
- API_URL
# Uncomment if you enabled Prometheus metrics # Uncomment if you enabled Prometheus metrics
#ports: #ports:
# - 127.0.0.1:${BOT_METRICS_PORT}:${BOT_METRICS_PORT} # - 127.0.0.1:${BOT_METRICS_PORT}:${BOT_METRICS_PORT}
@ -53,6 +54,7 @@ services:
- DB_STRING=mongodb://mogus:${DB_PASS}@mongo:27017/admin - DB_STRING=mongodb://mogus:${DB_PASS}@mongo:27017/admin
- NODE_ENV=production - NODE_ENV=production
- BRIDGE_METRICS_PORT - BRIDGE_METRICS_PORT
- API_URL
# Uncomment if you enabled Prometheus metrics # Uncomment if you enabled Prometheus metrics
#ports: #ports:
# - 127.0.0.1:${BRIDGE_METRICS_PORT}:${BRIDGE_METRICS_PORT} # - 127.0.0.1:${BRIDGE_METRICS_PORT}:${BRIDGE_METRICS_PORT}