diff options
| -rw-r--r-- | CHANGELOG.rst | 5 | ||||
| -rw-r--r-- | ihatemoney/conf-templates/supervisord.conf.j2 | 2 | ||||
| -rwxr-xr-x | ihatemoney/manage.py | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index de1356e..44c2641 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,10 @@ This document describes changes between each past release. 2.1 (unreleased) ---------------- -- Nothing changed yet. +Fixed +===== + +- Fix the generation of the supervisord template (#306) 2.0 (2017-12-27) diff --git a/ihatemoney/conf-templates/supervisord.conf.j2 b/ihatemoney/conf-templates/supervisord.conf.j2 index fa16c0c..605f39d 100644 --- a/ihatemoney/conf-templates/supervisord.conf.j2 +++ b/ihatemoney/conf-templates/supervisord.conf.j2 @@ -1,5 +1,5 @@ [program:ihatemoney] -command={{ venv_path }}/bin/gunicorn -c /etc/ihatemoney/gunicorn.conf.py ihatemoney.wsgi:application +command={{ bin_path }}/gunicorn -c /etc/ihatemoney/gunicorn.conf.py ihatemoney.wsgi:application user=ihatemoney autostart=true autorestart=true diff --git a/ihatemoney/manage.py b/ihatemoney/manage.py index 797e6c4..9982890 100755 --- a/ihatemoney/manage.py +++ b/ihatemoney/manage.py @@ -49,9 +49,11 @@ class ConfigTemplate(Command): os.path.join('conf-templates/', config_file) + '.j2' ).decode('utf-8') + bin_path = os.path.join(os.path.dirname(sys.executable)) + print(Template(template_content).render( pkg_path=os.path.abspath(os.path.dirname(__file__)), - venv_path=os.environ.get('VIRTUAL_ENV'), + bin_path=bin_path, secret_key=self.gen_secret_key(), )) |
