Handle starting TFWServer in baseimage

This commit is contained in:
Kristóf Tóth
2018-06-29 22:53:44 +02:00
parent 708c920784
commit 7c0e6d49bc
3 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,4 @@
[program:tfwserver]
user=root
directory=%(ENV_TFW_SERVER_DIR)s
command=python3 tfw_server.py

9
supervisor/tfw_server.py Normal file
View File

@ -0,0 +1,9 @@
from tornado.ioloop import IOLoop
from tfw.networking import TFWServer
from tfw.config import TFWENV
if __name__ == '__main__':
TFWServer().listen(TFWENV.WEB_PORT)
IOLoop.instance().start()