Giter Club home page Giter Club logo

mediaserver's Introduction

MediaServer

Media Server designed to run on a RaspberryPi or other dedicated server

Installation Instructions:

Install mongodb
$ sudo apt-get install mongodb

Create databases with names tv, movies, and books

$ mongo
> use tv
> use movies
> use books
Install python3.4
$ sudo apt-get install python3.4 virtualenv

Clone repo

$ git clone https://github.com/jasonwarta/MediaServer.git

set up virtual environment and install package

$ virtualenv --python=python3.4 MediaServer
$ cd MediaServer
$ source bin/activate
$ pip install -e .

to run locally as a dev server, enable execution for these two scripts to make your life easier

$ chmod +x startup.sh
$ chmod +x restart.sh

To start or resetart the server, run ./startup.sh or ./restart.sh

Check the paths in media-server.ini to ensure they match your configuration.

[uwsgi]
logto = /home/pi/MediaServer/wsgi.log

wsgi-file = wsgi.py
callable = app

master = true
processes = 5

socket = /tmp/media-server.sock
chmod-socket = 666
vacuum = true

die-on-term = true

Check the paths in start_media_server.sh to ensure that they match your configuration.

cd /home/pi/MediaServer/ && source bin/activate && uwsgi --ini media-server.ini 2>&1 >> wsgi.log & disown $!

Make the startup script executable with chmod +x start_media_server.sh, and add a line to your crontab to ensure that it runs on startup. Run sudo crontab -e and add @reboot /home/pi/MediaServer/start_media_server.sh the bottom of the file.

Install nginx

Run sudo apt-get install nginx and configure a new site with sudo nano /etc/nginx/sites-available/media-server. Paste in the config below and make required changes to the paths to point nginx at your file locations.

Nginx Sample Config
server {
    listen 80;

    location /movies {
        alias /var/www/drive/movies;
    }

    location /tv {
        alias /var/www/drive/tv;
    }

    location /allitebooks {
        alias /var/www/drive/allitebooks;
    }

    location / {
        include uwsgi_params;
        uwsgi_pass unix:/tmp/media-server.sock;
    }
}

mediaserver's People

Contributors

jasonwarta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.