Browse Source

Remove long winded installation guide

Add config guide
Minor changes to default config
merge-requests/1/merge
knotteye 2 years ago
parent
commit
fad832fe38
  1. 2
      config/default.toml
  2. 26
      docs/CONFIGURATION.md
  3. 57
      docs/INSTALLING.md
  4. 1
      docs/README.md
  5. 8
      site/styles.css
  6. 1
      src/http.ts
  7. 2
      templates/user.njk

2
config/default.toml

@ -7,7 +7,6 @@ saltRounds = 12
name = ''
domain = ''
registration = false
webFormat = 'hls'
restrictedNames = ['live']
rootredirect = '/users/live'
@ -41,7 +40,6 @@ ping = 30
ping_timeout = 60
[server.http]
port = 8080
allow_origin = '*'
directory = './site'

26
docs/CONFIGURATION.md

@ -0,0 +1,26 @@
## Configuring Satyr
### Config file
All changes to satyr's config will go in the config/local.toml file
Some values you might want to change are
```
[satyr]
registration = true
#allow new users to register
rootRedirect = '/users/live'
#the page users are directed to when they visit your site root
[media]
record = true
#allow users to record VODs
[bcrypt]
saltRounds = 12
#change the number of rounds of bcrypt to fit your hardware
#if you don't understand the implications, don't change this
[ircd]
enable = true
#enable IRC peering
```
### Web Frontend
If you want to customize the front-end css, place a file with any changes you wish to make at site/local.css
You can change the logo by replacing site/logo.svg, or edit templates/base.njk to look for another source.

57
docs/INSTALLING.md

@ -1,57 +0,0 @@
## Installing Satyr
A generic guide for install satyr. Example commands are provided for distributions based on debian and arhc.
### Preparing the system
It is reccomended to create a system user to run satyr.
```bash
adduser satyr -D /var/lib/satyr -m -r -U
```
Install ffmpeg and mysql with your package manager.
```bash
sudo apt install ffmpeg mysql
pacman -S ffmpeg mysql
```
### Installing NodeJS
#### Installing on distributions with a compatible version of node
If your distribution ships with a compatible version of node(stable, >=10), you can install it with your distribution's package manager.
```bash
sudo apt install nodejs
```
You can verify the version with
```bash
node --verion
```
#### Installing on distributions with an incompatible version of node
If the version provided by your disribution is not a new enough version, is a nightly build (such as Arch), you will need to get a compatible version from [nodejs.org](https://nodejs.org/en/downloads) and add the binaries to your path.
```bash
wget https://nodejs.org/dist/path/to/download.tar.xz
tar -xf node-v10.something.tar.xz
```
Add the /bin folder to your path (and the path of the satyr user), or symlink the binaries.
```bash
sudo ln -sf node-v10.something/bin/node /usr/bin
sudo ln -sf node-v10.something/bin/npm /usr/bin
sudo ln -sf node-v10.something/bin/npx /usr/bin
```
Alternatively, use a tool like [nvm](https://github.com/nvm-sh/nvm) to manage your current node version.
### Install Satyr
Clone the satyr repo to a folder such as /opt/satyr or /var/lib/satyr and make satyr the owner of the folder.
```bash
sudo mkdir -p /opt/satyr
sudo chown -R satyr:satyr /opt/satyr
sudo -Hu satyr git clone https://gitlab.com/knotteye/satyr.git /opt/satyr
```
Change to the satyr directory and install dependecies. It will ask you a few questions to generate an initial config.
```bash
cd /opt/satyr
npm install
```
Build and start the server.
```bash
npm run build
npm start
```

1
docs/README.md

@ -7,6 +7,7 @@ System dependencies: A stable version of node>=10, mysql3 (or a compatible imple
git clone https://gitlab.com/knotteye/satyr.git
cd satyr
npm install
npm run setup
npm run build
```

8
site/styles.css

@ -1,10 +1,10 @@
body {
color: white;
background-color: #1f1f1f;
color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
}
a {
color: #368cf3;
color: #074115;
text-decoration: none;
}
@ -52,7 +52,7 @@ a {
#footer {
text-align: center;
color: #bdbdbd;
color: #000000;
}
#footer > div {

1
src/http.ts

@ -13,7 +13,6 @@ function init(satyr: any){
njk.configure('templates', {
autoescape: true,
express : app,
watch: true
});
njkconf ={
sitename: satyr.name,

2
templates/user.njk

@ -1,7 +1,7 @@
{% extends "base.njk" %}
{% block content %}
</br>
<span style="float: left;font-size: large;"><b>{{ user }} | {{ streamtitle | escape }}</b></span><span style="float: right;font-size: large;"> Links | <a href="/vods/{{ user }}">VODs</a></span>
<span style="float: left;font-size: large;"><a href="rtmp://{{ domain }}/live{{ user }}">{{ user }}</a> | {{ streamtitle | escape }}</b></span><span style="float: right;font-size: large;"> Links | <a href="/vods/{{ user }}">VODs</a></span>
<div id="jscontainer">
<div id="jschild" style="width: 70%;height: 100%;">
<video controls poster="/thumbnail.jpg" class="video-js vjs-default-skin" id="live-video" style="width:100%;height:100%;"></video>

Loading…
Cancel
Save