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] [prod]
ini=:uwsgi ini=:uwsgi
module=karumedia module=karumedia
chdir=/srv/http/karumedia chdir=/srv/http/KaruMediaServer/api
socket=/run/uwsgi/karumedia socket=/run/uwsgi/karumedia

View File

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

View File

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

View File

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