server changes

This commit is contained in:
Arti Zirk 2016-11-14 11:23:00 +02:00
parent d82f7f0bb2
commit ad3f095f86
6 changed files with 18 additions and 8 deletions

View File

@ -19,5 +19,5 @@ manage-script-name = true
[prod]
ini=:uwsgi
module=karumedia
chdir=/srv/http/karumedia
chdir=/srv/http/KaruMediaServer/api
socket=/run/uwsgi/karumedia

View File

@ -12,7 +12,7 @@ import subprocess
logging.basicConfig(level=logging.DEBUG)
movie_dir = "/media/kraam/Videod/Filmid/Nimed"
movie_dir = "/home/arti/Videod/Filmid"
imdb = Imdb()

View File

@ -1,11 +1,12 @@
[uwsgi]
logger = syslog:karu-media-web
plugin = python
socket = /run/uwsgi/karu-media
chdir = /srv/karu-media
#logger = syslog:karu-media-web
#plugin = python
socket = /run/uwsgi/karumedia-web
chdir = /srv/http/KaruMediaServer
module = web-interface
callable = app
processes = 1
threads = 2
master = true
venv = venv
need-app=true

View File

@ -6,8 +6,8 @@ from flask import render_template
from flask import request
from urllib.parse import quote_plus
movie_base = "/media/kraam/Videod/Filmid"
movie_dir = movie_base+"/Nimed"
movie_base = "/home/arti/Videod/Filmid"
movie_dir = movie_base
app = Flask(__name__)

1
web_interface.py Symbolic link
View File

@ -0,0 +1 @@
web-interface.py

8
wsgi.py Normal file
View File

@ -0,0 +1,8 @@
from web_interface import app as application
if __name__ == "__main__":
from wsgiref.simple_server import make_server
httpd = make_server('0.0.0.0', 8080, application)
print("Serving on http://0.0.0.0:8080/")
httpd.serve_forever()