1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coin_ynh.git synced 2024-09-03 18:16:26 +02:00
This commit is contained in:
Alexandre Aubin 2023-12-16 17:15:48 +01:00
parent ce85a23a39
commit affabb064a
4 changed files with 13 additions and 29 deletions

View file

@ -1,16 +0,0 @@
[Unit]
Description=YNH_APP_INSTANCE_NAME gunicorn daemon
After=network.target
[Service]
PIDFile=/run/gunicorn/YNH_APP_INSTANCE_NAME-pid
User=YNH_APP_INSTANCE_NAME
Group=www-data
WorkingDirectory=/opt/YNH_APP_INSTANCE_NAME
ExecStart=__YNH_PYTHON_PATH__/gunicorn -c /opt/YNH_APP_INSTANCE_NAME/gunicorn_config.py YNH_APP_INSTANCE_NAME.wsgi
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View file

@ -1,8 +1,8 @@
command = '__YNH_PYTHON_PATH__/gunicorn' command = '__INSTALL_DIR/venv/bin/gunicorn'
pythonpath = '/opt/__APP__' pythonpath = '__INSTALL_DIR__'
workers = 4 workers = 4
user = '__APP__' user = '__APP__'
bind = 'unix:/opt/__APP__/sock' bind = 'unix:__INSTALL_DIR__/sock'
pid = '/run/gunicorn/__APP__-pid' pid = '/run/gunicorn/__APP__-pid'
errorlog = '/var/log/__APP__/error.log' errorlog = '/var/log/__APP__/error.log'
accesslog = '/var/log/__APP__/access.log' accesslog = '/var/log/__APP__/access.log'

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import unicode_literals from __future__ import unicode_literals
import os import os
from settings_base import * from .settings_base import *
DEBUG = TEMPLATE_DEBUG = False DEBUG = TEMPLATE_DEBUG = False

View file

@ -7,7 +7,7 @@ PIDFile=/run/gunicorn/__APP__-pid
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/ WorkingDirectory=__INSTALL_DIR__/
ExecStart=__YNH_PYTHON_PATH__/gunicorn -c __INSTALL_DIR__/gunicorn_config.py __APP__.wsgi ExecStart=__INSTALL_DIR__/venv/bin/gunicorn -c __INSTALL_DIR__/gunicorn_config.py __APP__.wsgi
ExecReload=/bin/kill -s HUP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true PrivateTmp=true