Change how gunicorn runs this.

This commit is contained in:
Wim Pomp
2022-08-30 13:37:50 +02:00
parent 50b2d12f54
commit 4d94b8a0a8
3 changed files with 2 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ Wants=network-online.target
[Service] [Service]
User=matlab-user User=matlab-user
Type=simple Type=simple
ExecStart=/usr/local/bin/gunicorn --bind unix:/tmp/matlabhub.sock matlabhub.wsgi:application ExecStart=/usr/local/bin/gunicorn --bind unix:/tmp/matlabhub.sock matlabhub.app:app
ExecStop=/bin/kill -s STOP $MAINPID ExecStop=/bin/kill -s STOP $MAINPID
ExecReload=/bin/kill -s HUP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0 TimeoutSec=0

View File

@@ -1,3 +0,0 @@
import os
import sys
from matlabhub.app import app as application

View File

@@ -19,7 +19,7 @@ setuptools.setup(
'Operating System :: OS Independent', 'Operating System :: OS Independent',
], ],
python_requires='>=3.8', python_requires='>=3.8',
install_requires=['matlab-proxy', 'flask'], install_requires=['matlab-proxy', 'flask', 'gunicorn', 'pyyaml'],
entry_points={'console_scripts': ['matlabhub=matlabhub:main'], }, entry_points={'console_scripts': ['matlabhub=matlabhub:main'], },
package_data={'': ['templates/*', 'config.yml']}, package_data={'': ['templates/*', 'config.yml']},
include_package_data=True, include_package_data=True,