Git Product home page Git Product logo

logviewer's Introduction

Modmail Log Viewer

A simple webserver to view your selfhosted modmail logs.

Deploy to Heroku Support Donate on Patreon Made with Python 3.9 Coding Style Black AGPL License

What is this?

In order for you to view your self-hosted logs, you have to deploy this application. Before you deploy the application, create a config var named MONGO_URI and put your MongoDB connection URI from the previous section into the value slot. Take the URL of this app after you deploy it and input it as a config var LOG_URL in the Modmail bot app.

Updating

You can automatically update the logviewer in your Heroku account whenever changes are made to this repo.

To enable auto-updates, fork this repo and install the Pull app in your fork. Then go to the Deploy tab in your Heroku account, select GitHub and connect your fork. Turn on auto-deploy for the master branch.

Self-Hosting Setup

The method of hosting the logviewer depends on your server configurations.

Below are some general instructions to help you get started on a Linux machine.

Prerequisites

e.g. on Ubuntu:

sudo apt install software-properties-common python3.9 python3-dev python3-pip

Deployment

Run the following shell commands:

git clone https://github.com/kyb3r/logviewer
cd logviewer
python3 -m pip install pipenv
pipenv install
cp .env.example .env

Edit the .env file (e.g. nano .env) and fill in your MongoDB connection URI.

You can also customize the bind IP and port in the .env file.

Then to start the app, run:

pipenv run logviewer

You can verify the logviewer is working by navigating to http://<IP_OF_SERVER>:8000 (if you didn't change the bind IP / port) and should be greeted with the Logviewer main page.

To run the program in the background, you can use screen. Or you can use a service manager, such as systemd, which can also auto-restart the logviewer on failure and after system reboot.

Advanced

We recommend setting up Nginx reverse proxy to port forward external port 80 to your internal logviewer port and cache static web contents (tutorial).

To accept requests from a domain instead of your server IP, simply set an A/AAAA record from your DNS record manager that forwards your domain to your server IP.

Discord OAuth2

Protecting your logs with a login (Discord Oauth2 support) is a premium feature, only available to Patrons.

Contributing

If you can make improvements in the design and presentation of logs, please make a pull request with changes.

logviewer's People

Contributors

taaku18 avatar kyb3r avatar lorenzo132 avatar fourjr avatar coolguy3289 avatar konggal avatar robinmahieu avatar sebkuip avatar vinchethescript avatar infinitepower18 avatar dependabot[bot] avatar laundmo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.