khakers / modmail-viewer

An advanced web frontend for the modmail discord bot with built in Discord OAuth2 authentication, and support for browsing and searching current and historical logs. Directly replaces logviewer.
MIT License
10 stars 4 forks source link

[Help]: Where to set environment variables without using docker? #78

Closed Hoshino-Yukino closed 1 year ago

Hoshino-Yukino commented 1 year ago

Is there an existing issue for this?

Version

v0.6.4

In which part of the application does the error occur?

Unknown/both

Current Behavior

If I don't use docker and run modmail directly by downloading tar, where should I configure environment variables such as MODMAIL_VIEWER_MONGODB_URI

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS: Ubuntu 20.04
- Java: 17.0.7

Relevant log output

Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.github.khakers.modmailviewer.Main.main(Main.java:72)
Caused by: java.lang.IllegalArgumentException: No mongodb URI provided. provide one with the option "MODMAIL_VIEWER_MONGODB_URI"
        at org.apache.logging.log4j.core.util.Assert.requireNonEmpty(Assert.java:96)
        at com.github.khakers.modmailviewer.Config.<clinit>(Config.java:26)
        ... 1 more
khakers commented 1 year ago

This is a bit of a broad Linux question since it heavily depends on how you're running the application.

If you're using systemd, for instance, you could set them in your unit file. (Forgot to add: There are good tutorials for this or pretty much anything you choose)