modmail-dev / Modmail

A Discord bot that functions as a shared inbox between staff and members, similar to Reddit's Modmail.
https://docs.modmail.dev
GNU Affero General Public License v3.0
1.57k stars 4.59k forks source link

Merge logviewer + modmail into 1 project (repository) #2849

Closed ririko5834 closed 1 year ago

ririko5834 commented 4 years ago

Is your feature request related to a problem? Please describe. No Describe the solution you'd like I want to merge modmail with logviewer into 1 repository. It wil be easier to setup and deploy on Heroku.

Who will this benefit Users who want to setup modmail easier. Users will just deploy 1 app on heroku instead of 2.

Additional context

Shashank3736 commented 4 years ago

Having a different app for log viewer usually help members self-hosting the bot. In any case, our self hosted bot is offline and we need logs then there will be no such issue. Using IP for port forwarding is not a gr8 choice. So having 2 apps is the best option.

ririko5834 commented 4 years ago

:/ Maybe, but i think that it will be easier to setup on Heroku and 1 project will use less project hours than 2 projects. For example i want to host 2 modmail bots on heroku and i dont have enough unused project hours. Also it will be easier to host on vps.

ririko5834 commented 4 years ago

I dont have credit card on heroku bcs i dont trust them.

Shashank3736 commented 4 years ago

:/ Maybe, but i think that it will be easier to setup on Heroku and 1 project will use less project hours than 2 projects. For example i want to host 2 modmail bots on heroku and i dont have enough unused project hours. Also it will be easier to host on vps.

Log viewer do not use project hour at all. M Most of us host the bot on VPS but log viewer on Heroku because it provides us with a domain to use on bot log URL. Otherwise, we need to create it. And it's easy to click on deploy > add mongo Uri > get URL.

I dont have credit card on heroku bcs i dont trust them.

If you don't trust them then you got only 550h which mean last 7 days of every month your bot will be offline. 👍

StephenDaDev commented 4 years ago

Ultimately, everything we do here is a balancing act. In some way, there is a pro and a con to every single change we make. Yes, while this would make it easier for users to deploy, it would also be an inconvenience for others at the same time. As many people run the bots and log viewers on different platforms. Additionally, Modmail and Logviewer are related, but at the same time, they are totally different, the modmail repo is for a discord bot, and the logviewer repo is for a webserver. Additionally, we have multiple different logviewers, and as such, combining them into one single repo would be a problem, if a user wanted to use a different version of the logviewer, as now they need to deal with having two logviewers unless they were to manually separate the bot from the logviewer, which is unnecessary work. We may in the future have a way to deploy both at the same time, but I can say quite positively, we will not be merging the repos at any time in the foreseeable future.

Taaku18 commented 4 years ago

This response is only to address the dyno hours-saving possibilities for Heroku in the event of a merge.


No, merging Modmail and the Logviewer will not change how the dyno hours are consumed, nor will it reduce the total hours used per month.

Heroku consumes "dyno hours" for every hour block your apps are active. "Web dynos" like the Logviewer's don't consume any dyno hours when it's sleeping - that's why it takes a long time to load the webpage after a while of inactivity. The main dyno-hogging aspect of Modmail is the bot itself. The bot uses the "worker dyno" which runs 24/7. With the 550 free dyno hours for an account without a linked credit card, 550h / 24h = 23 days (approx.), meaning even if you never use the logviewer, your bot will only be able to run for 23 days every month without a linked credit card. The only thing merging would change is that the web dyno hours will be billed to your Modmail app instead of its own Logviewer app. So if you use the Logviewer, the charge will still be the same as your Modmail app will now have two billed dynos: web and worker.

Taaku18 commented 1 year ago

I'm closing this issue for now. Maybe we'll revisit this in the future with enough demand. The Logviewer and Modmail bot exist separately due to the difference in purpose they serve. Keeping it this way allows you to deploy the bot on a single server, while spreading the Logviewer across multiple edge locations for maximum availability.