mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
update documentation
This commit is contained in:
2
website/src/plugins/installation.md
Normal file
2
website/src/plugins/installation.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Plugin installation
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# List of plugins
|
||||
|
||||
This list of plugins contains all official plugins of libreevent. For a more up-to-date version of this list, please check your
|
||||
|
||||
##
|
||||
@@ -1,9 +1,9 @@
|
||||
# Installation
|
||||
Let's begin with setting up libreevent! If you are not technically savvy or want somebody else to set it up for you, please contact me [here](https://api.janishutz.com/contact/setup?origin=libreevent&campaign=installation-docs). If you want to set it up yourself, read on below!
|
||||
Let's begin with setting up libreevent! If you are not technically savvy or want somebody else to set it up for you, please contact me [here](https://api.janishutz.com/contact/setup?origin=libreevent&campaign=installation-docs). If you want to set it up yourself, read on below! Soon, there will also be a video tutorial available.
|
||||
|
||||
|
||||
# Selecting a webhosting company
|
||||
Choosing the right hosting provider is not easy, especially since libreevent requires node.js. Therefore, we've listed a few really good options. This website here is hosted by asurahosting. *Note: I may receive a small commission when you buy webhosting using one of the links provided below. This won't affect the price you pay.*
|
||||
Choosing the right hosting provider is not easy, especially since libreevent requires node.js. Therefore, we've listed a few really good options. Whatever hosting provider you end up going with, it is important that they explicitly list Node.js as a feature of that hosting account. All hosting providers below also include MySQL which is beneficial to have and a must-have when you are expecting to sell a lot of tickets simultaneously. This website here is hosted by asurahosting. *Note: I may receive a small commission when you buy webhosting using one of the links provided below. This won't affect the price you pay.*
|
||||
https://clients.asurahosting.com/aff.php?aff=1997
|
||||
https://www.novatrend.ch/en/
|
||||
https://www.hostinger.com/
|
||||
@@ -16,18 +16,53 @@ https://affiliates.hostinger.com/users/signup/
|
||||
https://www.a2hosting.com/about/affiliate-program/
|
||||
https://www.digitalocean.com/go/affiliates
|
||||
|
||||
|
||||
# Downloading libreevent
|
||||
We are going to start off by downloading libreevent. On this website, open the navigation menu and head to "Downloads". (We would strongly suggest that you open the link in a new tab by right clicking on the link and hitting "Open in new tab"). Below, hit the download button. This will download a production ready build of libreevent as a zip file. Save it to any convenient location. Head there and extract the zip-Archive (On windows, right click, extract; On MacOS, just double click; on Linux, there is either a zip utility installed or otherwise use the unzip utility in the terminal).
|
||||
|
||||
## Database
|
||||
|
||||
TODO: Make it so that it's not necessary to mention this here.
|
||||
In the database, all the userdata is stored. libreevent currently supports two different databases, MySQL and a custom database based on JSON. Which one to choose?
|
||||
|
||||
Generally MySQL, except:
|
||||
- If your organisation is small and does only sell a few tickets at a time, the JSON based database works perfectly fine.
|
||||
- Your web hosting plan does not includes MySQL and you've got no access to MySQL in any other way. *NOTE: Free MySQL services should NEVER be used in such an application, as most hosting plans include MySQL which is much more reliable and if you lose access to the database, you can only access the root account and all other user data (and therefore all user accounts) is lost. The event data is always stored in JSON format as it is more efficient.*
|
||||
- Your web hosting plan does not includes MySQL and you've got no access to MySQL in any other way. *NOTE: Free MySQL services should NEVER be used in such an application, as most hosting plans include MySQL (or MariaDB, which works similarly) which is much more reliable and if you lose access to the database, you can only access the root account and all other user data (and therefore all user accounts) is lost. The event data is always stored in JSON format as it is more efficient this way.*
|
||||
|
||||
**NOTE: The JSON database is really slow and should only be used if you have a small event where you expect to sell less than 5 ticket per minute! The amount of tickets sold per minute that the system can handle really depends on the speed of the server the website runs on.**
|
||||
|
||||
MySQL generally is more difficult to set up, but we'll run you through the process here to make the process easier for you. If you chose the JSON based database, skip ahead to the next chapter.
|
||||
MySQL generally is more time consuming to set up, but we'll run you through the process here to make the process easier for you.
|
||||
|
||||
If you are using the JSON-DB, continue reading:
|
||||
|
||||
Head into the folder you have downloaded libreevent into and open the "config" directory. In there you can see a few ".json" files. Open the "settings.config.json" file using a text editor (on Windows you could use Notepad, on MacOS TextEdit and on Linux, I personally like to use Nano or Vim, which are cli only or for graphical ones, use for example gedit).
|
||||
|
||||
In JSON, data is stored in so-called Key-Value-Pairs. Look for "db" in there and and replace the default "mysql" with "json". Keep this file and folder open and skip the next chapter.
|
||||
|
||||
|
||||
## Setting up a MySQL database
|
||||
At this point, we assume that you have already purchased webhosting and you are logged in to the administration panel of your webhosting provider. This guide will use the Web Control Panel called "Direct Admin", as it is fairly common, along with cPanel. Somewhere, there should be a button that says something like "MySQL Management". Click it, which will bring you to the MySQL-Database management page. Now, create a new database by clicking the "Create new database" (or similar) button which will bring up the database creation tool. Give the database any name you like and give the user any name you like. When creating a password, it is important that this password is long and complicated. What we recommend doing is using a password generator or to essentially "sit" onto your keyboard to get a random string of characters as the password.
|
||||
|
||||
TODO: Make setup better (including db setup)
|
||||
Now copy this password and open the download location of libreevent. Inside of the libreevent folder and open the "config" folder and open the file called "db.config.json" using a text editor (on Windows you could use Notepad, on MacOS TextEdit and on Linux, I personally like to use Nano or Vim, which are cli only or for graphical ones, use for example gedit). Now, paste the password between the empty quotes after "password". For the host value type your domain, for the "database" parameter, type the name of the database you just created (including any prefixes shown there) and for the database user, type the username you just created (again, including any prefixes shown in the admin panel).
|
||||
|
||||
Now hit "Create Database" to actually create the database.
|
||||
|
||||
And just like that, you have finished setting up your database.
|
||||
|
||||
|
||||
# Uploading libreevent
|
||||
It is now time to upload libreevent to your webhosting account. The recommended way of doing this is to download a FTP client like "FileZilla" and to connect to the hosting account in that way using the credentials provided by the hosting provider. In this guide we assume you use this way. Download and install FileZilla. It is a free and open source FTP client. Open it and you will see a few empty fields towards the top of the app. There you will need to fill in the information given by your hosting provider. Usually, the Host is ftp.yourDomain.com, the username and password are usually your admin account credentials and the port is usually 25552 or can be left empty. Then hit quick connect. At this point, a SSL warning might appear, as the certificate might not (yet) be configured correctly to also include FTP. Accept the certificate and you should be connected. Now create a new folder called "libreevent" by right clicking onto the empty space on the right pane (where it says "remote site") and selecting "create directory". Then on the left side (where it says "local side" navigate to the extracted libreevent folder and upload its contents by selecting it and right clicking to hitting "Upload"). Once that process is completed, you should be set to go to the next session.
|
||||
|
||||
## npm install
|
||||
This project relies on a variety of different node.js modules that need to be installed on the server. Most webhosting providers give you an easy way to run *npm install*. If not, you might be required to upload the *node_modules* folder yourself. You can create such a folder either by downloading the *node_modules.zip* folder from the GitHub releases page or by installing npm on your local machine and then by running *npm i* in the terminal.
|
||||
This project relies on a variety of different node.js modules that need to be installed on the server. Most webhosting providers give you an easy way to run *npm install*. If not, you might be required to upload the *node_modules* folder yourself. You can create such a folder either by downloading the *node_modules.zip* folder from the GitHub releases page or by installing npm on your local machine and then by running *npm i* in the terminal.
|
||||
|
||||
To set up the node application in most hosting providers, head to the admin panel of your hosting account once again. Navigate to the main page and scroll down until you find something that says "Setup Node.js App". Click it and wait for it to load. Click "Create Application" and select the newest available Node.js version and set the Application mode to "Production". For the application root insert the directory name which you have created just before when uploading.
|
||||
|
||||
For the Application URL field, click onto "Choose any value" and select an appropriate domain.
|
||||
|
||||
For the Application startup file type "app.js".
|
||||
|
||||
In the section "Environment variables" hit "Add Variable" and in the appearing fields type beneath "Name" the following: "PORT" (without the quotes!) and under "Value" "8080" (again without quotes). Then hit done and at the top "create". If you end up on the start page again, hit the little pencil icon to get to the application editor. Scroll down to the "Detected configuration files" section and click "Run NPM Install". Once it shows a success message (at the top!), hit "Restart".
|
||||
|
||||
CONGRATULATIONS! You are all set with the installation of libreevent! Now open a new tab in your webbrowser and type your domain name!
|
||||
1
website/src/setup/security.md
Normal file
1
website/src/setup/security.md
Normal file
@@ -0,0 +1 @@
|
||||
# Security best practices
|
||||
@@ -1,3 +1,5 @@
|
||||
# Updating
|
||||
|
||||
Updating libreǝvent is important to keep it secure, performant and bug-free. You can update libreevent automatically using the update tool on the settings page in the admin panel. The tool will automatically fetch all files that have been changed since the last version update. For this, it will have to make a webrequest to GitHub to fetch the JSON file with the update information. After that, many webrequests have to be performed to GitHub to download the new version. Before installing, the tool will show you the full changelog of the new version of libreevent. After the install has completed, you will need to restart libreevent such that the changes can be applied.
|
||||
Updating libreǝvent is important to keep it secure, performant and bug-free. Currently, updating libreevent involves manually uploading the new files.
|
||||
|
||||
**IMPORTANT: make sure to ALWAYS download the data and config directories before updating to not lose any data in case something goes wrong! When uploading, do NOT upload the data and config directories except the release note tell you anything else. Please also always follow any notes detailed in the release notes.**
|
||||
@@ -1,8 +1,8 @@
|
||||
# Systemrequirements
|
||||
libreevent's system requirements are low, you only need a PC or Server that can run node.js and is able to install npm packages. If the system you are trying to use is unable to download npm packages, you may download the packages on your own system and upload them together with the rest of the server files. How to do that is described in greater detail in the [Getting Started guide](/docs/gettingStarted).
|
||||
libreevent's system requirements are low, you only need a PC or Server that can run node.js and is able to install npm packages. If the system you are trying to use is unable to download npm packages, you may download the packages on your own system and upload them together with the rest of the server files. How to do that is described in greater detail in the [Getting Started guide](/docs/setup/installation).
|
||||
|
||||
## node.js
|
||||
Your system needs to be able to run node.js V > 12.0 and must have access to either npm or the downloaded npm packages.
|
||||
Your system needs to be able to run node.js V > 16.0 and must have access to either npm or the downloaded npm packages.
|
||||
|
||||
## Hardware requirements
|
||||
Hardware requirements solely depend on the amount of usage it is going to get. An average hosting plan should be able to handle about 1000 people. In case the system is not able to uphold the traffic, it will activate a protection to try and stop overloading and crashing the system. Although using multiple checks, we cannot guarantee that the system will never crash due to being overloaded, so, if the website is important, please overspec the server.
|
||||
Hardware requirements solely depend on the amount of usage it is going to get. A cheap hosting plan should be able to handle about 100 simultaneous people. Failing to meet the CPU recommendation may lead to slow response times when a lot of people try to connect to the server at once. A good way to mitigate this problem is to use cloudflare's DDOS protection or rate limiting feature. Follow their official guide [here](https://developers.cloudflare.com/waf/rate-limiting-rules/best-practices/) on how to set it up. Many hosting providers already use Cloudflare and you may have settings for cloudflare already enabled. Otherwise, [create a cloudflare account](https://dash.cloudflare.com/sign-up?lang=en-US) and update your website's DNS records to instead of directly pointing to your webserver to point to Cloudflare's DNS where you can re-add the DNS records that were previously configured in your hosting provider's DNS. For more information see [Security best practices](/docs/setup/security).
|
||||
Reference in New Issue
Block a user