#
๐ญ Templates#
Only required variables#
All available variables#
DescriptionsHere you can find a detailed description of available environment variables. Variables marked with ๐ด are required !
#
CONNECTOR_LOG_LIFETIMEDefines how long the logs will be stored and available.
- Requirements: Type of string following the pattern: [0-9]+(d)
- Default:
31d
- Example:
12h
#
DISCORD_CHANNELId of the channel in discord, where all notification should be published. To get the id, activate the "Developer Mode" in Discord. More information can you find here.
- Requirements: Type of number
- Example:
912309123909091230992
#
DISCORD_TOKENToken you got from the Discord-Developer-Portal. Instructions, how you can create your own token, can you here
- Requirements: Type of string
- Example:
123asdasd.asdk123m123bk123123.n23kn1n2k3nk123
#
๐ดโ ๏ธ JWT_SECRETSecret that is used to sign your authentication token. Choose a very strong secret! You do not have to save it, but it must be strong!
- Requirements: Type of string;
- Example:
ks454DF)ad!sd084!
#
JWT_EXPIRESINDefines, how long you will stay logged in at the web interface. 10m
is a good value.
- Requirements: Type of string; unit at the end
- Default value:
10m
- Example:
3h
#
LOG_TO_FILEDefines, whether logs are written to the filesystem. Logs are always written to std_out!
- Requirements: Boolean (
true
orfalse
) - Default value:
false
- Example:
true
#
๐ด MONGO_HOSTPath to your mongodb instance.
- Requirements: Type of string
- Example:
mongodb://mongo:27017/fmdb?ssl=true
#
MONGOOSE_DEBUG (only needed for development)Activates logging of mongodb queries. Only needed for development.
- Requirements: Boolean (
true
orfalse
) - Default value:
false
- Example:
false
#
๐ด MOODLE_BASE_URLThe URL where the Moodle instance is running. You can check and generate this variable on https://fmdb.tjarbo.me.
- Requirements: Type of string and a valid RFC 3986 URI
- Example:
https://moodle.myuniversity.edu
#
MOODLE_FETCH_INTERVALDefines how often the Notification Service looks for updates on the Moodle instance. Interval in milliseconds.
- Requirements: Type of number
- Default value:
900000
- Example:
1500000
#
MOODLE_REMINDER_TIME_LEFTIf the remaining time of a submission is less than the specified time, a notification will be sent. Time in seconds.
- Requirements: Type of number
- Default value:
86400
- Example:
86400
#
๐ด MOODLE_TOKENToken to log in to the specified Moodle instance. You can maybe get this from your settings or from https://fmdb.tjarbo.me.
- Requirements: Type of string
- Example:
asdbasd123asdb123123jnj5234nbadjn12332
#
MOODLE_USE_COURSE_SHORTNAMEWhether to use short- or fullname of the courses in the discord message.
- Requirements: Boolean (
true
orfalse
) - Default value:
true
- Example:
false
#
๐ด MOODLE_USERIDYour user id on the specified Moodle instance. It is part of the URL if you open your Moodle-Profile. https://fmdb.tjarbo.me can help you with this.
- Requirements: Type of number
- Example:
12345
#
NODE_ENVDefines the environment, where the bot will be started.
- Requirements: Only allowed values:
development
,production
,test
,provision
- Default value:
production
- Example:
development
#
PORTDefines on which Port your sever listens.
- Requirements: Needs to be a number
- Default value:
4040
- Example:
8080
#
REGISTRATION_TOKEN_LIFETIMEDefines how long a registration token will be valid to add a new user as administrator. After the registration token has been used, it becomes invalid independent from the lifetime.
- Requirements: Type of string following the pattern: [0-9]+(d)
- Default:
15m
- Example:
12h
#
RP_NAMEA human friendly readable title used for WebAuthn.
- Requirements: Type of string
- Default:
NotificationService
- Example:
NotificationServiceForMoodle
#
๐ด RP_IDUnique identifier for the notification service used for WebAuthn. According to our experience, it must be part of RP_ORIGIN
. The recommendation is to use the domain (no port or protocol compared to RP_ORIGIN
) where your service is available. If your service is running locally, you can use the value localhost
.
- Requirements: Type of string & Part of
RP_ORIGIN
- Example: `notification-service.tjarbo.me
#
๐ด RP_ORIGINThis must be a FQDN where your application will be running on. It is important that it matches exactly the domain (see example) were you will to the login and registration procedure on.
If you do not know the domain name right now, enter a placeholder value and update it afterwards. Registration and login will fail until RP_ORIGIN will match the domain name
- Requirements: Type of string and a valid RFC 3986 URI
- Example:
https://notificationservice.tjarbo.me