Skip to content

kkalkidan/Restforhead

 
 

Repository files navigation

Easy Installation

Be sure to have docker and docker-compose are installed.

  • Unfortunately we need to install local dependencies for now, otherwise different libraries may not be found. Thus a user even if they may opt not to use on their system, installing packages is needed
git clone --recursive https://github.com/tesyolan/Restforhead.git
cd Restforhead
npm install
./build.sh
  • To run, which would require prompt for password to set permission for mounting /var/docker/docker.sock into the docker to create new containers with the mounted operation:
./run-docker.sh

Manual Installation

Prerequisite installation

Nginx Installation

cd ~/
# first clone rtmp module
git clone https://github.com/arut/nginx-rtmp-module.git
wget http://nginx.org/download/nginx-1.12.1.tar.gz
tar -xf nginx-1.12.1.tar.gz
cd nginx-1.12.1/ 
# Note both ssl module and stub status are enabled.
./configure --add-module=../nginx-rtmp-module --with-http_ssl_module --with-http_stub_status_module
make -j`nproc`
make install # or use sudo

nginx configuration

There is a sample configuration in nginx folder in this repository

  • Be sure to create the respective folders detailed in the rtmp section.

Start the service

sudo service nginx start
  • If errors come up when starting the service diagnose with:
systemctl status nginx.service # or relevant commands

Install Python Requirements

cd py-app
pip install -r requirments.txt

Download the docker images which build HR stack.

./get_docker_images.sh

This above links point a valid, tested environment that works with this particular stack. One can manually point different applications with the tool also.

Installing the app

After having installed the prerequisites, you can set up the environment with the following lines. git clone --recursive https://github.com/tesYolan/Restforhead.git npm install # This recursively installs the dependencies requirements for each submodule. sudo chmod 777 /var/run/docker.sock npm run deploy # Include everthing.

  • NOTE: this had been tested on ubuntu environment primarily. MacOS and other setups may not go as smoothly. If you encounter an issue feel free to file an issue.

Configuration of the App

IP configuration

Docker Configuration

  • It's necessary to download the docker image for the HEAD initially.
  • It's necessary the image names being used are up available.

Important Functionalities that remain.

  • More dockerization of the application to make any one use it. We can utilize the nginx container for native usage as it largely isn't needed besides relaying requests.
  • Create consumer for RTP streams for audio/video.

Other Goals.

  • Detailed documentation to follow, in the meantime jsdoc enabled doc can be built by invoking grunt jsdoc
  • Make Misc.py work with the configuration as defined in the config file file.

Tests

  • More comprehensive tests. Currently their are tests to check validity of routes and their respective functionalities.
    npm test # to run tests.

About

Hang out with Sophia Online!

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.0%
  • Shell 2.7%
  • Python 2.3%
  • Dockerfile 2.0%