Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/majesty01/logviewerfc
https://github.com/majesty01/logviewerfc
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/majesty01/logviewerfc
- Owner: Majesty01
- License: gpl-3.0
- Created: 2022-12-06T19:31:37.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T19:31:40.000Z (about 2 years ago)
- Last Synced: 2024-11-10T02:24:55.451Z (2 months ago)
- Language: Python
- Size: 416 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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](https://github.com/apps/pull). 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
- A [Python 3.9 installation](https://www.python.org/downloads/) with `pip`
- `git` for your systeme.g. on Ubuntu:
```shell
sudo apt install software-properties-common python3.9 python3-dev python3-pip
```### Deployment
Run the following shell commands:
```shell
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:
```shell
pipenv run logviewer
```You can verify the logviewer is working by navigating to `http://: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](https://www.hostinger.com/tutorials/how-to-set-up-nginx-reverse-proxy/)).
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](https://patreon.com/kyber).
## Contributing
If you can make improvements in the design and presentation of logs, please make a pull request with changes.