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
- Be sure to have docker and docker-compose are installed.
- Install mongo
- And nginx with nginx-rtmp-module, http_ssl_module, http_stub_status_module. You could follow the instruction outlined below.
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
There is a sample configuration in nginx folder in this repository
- Be sure to create the respective folders detailed in the rtmp section.
sudo service nginx start
- If errors come up when starting the service diagnose with:
systemctl status nginx.service # or relevant commands
cd py-app
pip install -r requirments.txt
./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.
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.
- Change appropriate configuration in to direct the API calls.
- It's necessary to download the docker image for the HEAD initially.
- It's necessary the image names being used are up available.
- 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.
- 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.
- More comprehensive tests. Currently their are tests to check validity of routes and their respective functionalities.
npm test # to run tests.