mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
Systemd doc fixes + update CONTRIBUTORS
This commit is contained in:
parent
ba78ff7228
commit
84b096d3cd
3 changed files with 39 additions and 26 deletions
|
@ -16,10 +16,12 @@ donkers <thedonkers@gmail.com>
|
|||
Feth AREZKI <feth@tuttu.info>
|
||||
Frédéric Sureau <fredericsureau@gmail.com>
|
||||
Jocelyn Delalande <jocelyn@crapouillou.net>
|
||||
Luc Didry <luc@didry.org>
|
||||
Lucas Verney <phyks@phyks.me>
|
||||
Mathieu Leplatre <leplatrem@gmail.com>
|
||||
Marien Fressinaud <dev@marienfressinaud.fr>
|
||||
mduret <mathieu.duret@gmail.com>
|
||||
nailyk <nailyk_git@nailyk.fr>
|
||||
Tinmn <royque@gmail.com>
|
||||
Toover <toover@toover.me>
|
||||
Xavier Mehrenberger <xavier.mehrenberger@gmail.com>
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
[Unit]
|
||||
Description=I hate money
|
||||
Requires=network.target postgresql.service
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ihatemoney
|
||||
WorkingDirectory=/var/lib/ihatemoney
|
||||
ExecStart=/var/lib/ihatemoney/bin/gunicorn -c /etc/ihatemoney/gunicorn.conf.py ihatemoney.wsgi:application
|
||||
SyslogIdentifier=ihatemoney
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -50,10 +50,6 @@ Activate the virtualenv::
|
|||
Install
|
||||
=======
|
||||
|
||||
Install Gunicorn dependency::
|
||||
|
||||
pip install gunicorn
|
||||
|
||||
Install the latest release with pip::
|
||||
|
||||
pip install ihatemoney
|
||||
|
@ -135,7 +131,11 @@ With Apache and mod_wsgi
|
|||
4. Activate the virtual host if needed and restart Apache
|
||||
|
||||
With Nginx, Gunicorn and Supervisord/systemd
|
||||
------------------------------------
|
||||
--------------------------------------------
|
||||
|
||||
Install Gunicorn::
|
||||
|
||||
pip install gunicorn
|
||||
|
||||
1. Create a dedicated unix user (here called `ihatemoney`), required dirs, and fix permissions::
|
||||
|
||||
|
@ -147,21 +147,46 @@ With Nginx, Gunicorn and Supervisord/systemd
|
|||
|
||||
ihatemoney generate-config gunicorn.conf.py > /etc/ihatemoney/gunicorn.conf.py
|
||||
|
||||
3a. Create supervisor config file ::
|
||||
3. Setup Supervisord or systemd
|
||||
|
||||
- To use Supervisord, create supervisor config file ::
|
||||
|
||||
ihatemoney generate-config supervisord.conf > /etc/supervisor/conf.d/ihatemoney.conf
|
||||
|
||||
3b. To use systemd services, symlink ``ihatemoney.service`` to [#systemd-services]_::
|
||||
- To use systemd services, create ``ihatemoney.service`` in [#systemd-services]_::
|
||||
|
||||
ln -s /var/lib/ihatemoney/conf/ihatemoney.service /lib/systemd/system/ihatemoney.service
|
||||
[Unit]
|
||||
Description=I hate money
|
||||
Requires=network.target postgresql.service
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ihatemoney
|
||||
ExecStart=/home/john/ihatemoney/bin/gunicorn -c /etc/ihatemoney/gunicorn.conf.py ihatemoney.wsgi:application
|
||||
SyslogIdentifier=ihatemoney
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Obviously, adapt the ``ExecStart`` path for your installation folder.
|
||||
|
||||
If you use SQLite as database: remove mentions of ``postgresql.service`` in ``ihatemoney.service``.
|
||||
If you use MySQL or MariaDB as database: replace mentions of ``postgresql.service`` by ``mysql.service`` or ``mariadb.service`` in ``ihatemoney.service``.
|
||||
|
||||
Then reload systemd, enable and start ``ihatemoney``::
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable ihatemoney.service
|
||||
systemctl start ihatemoney.service
|
||||
|
||||
4. Copy (and adapt) output of ``ihatemoney generate-config nginx.conf`` with your nginx vhosts [#nginx-vhosts]_
|
||||
5. Reload both nginx and supervisord. It should be working ;)
|
||||
5. Reload nginx (and supervisord if you use it). It should be working ;)
|
||||
|
||||
.. [#nginx-vhosts] typically, */etc/nginx/conf.d/* or
|
||||
*/etc/nginx/sites-available*, depending on your distribution.
|
||||
|
||||
.. [#systemd-services] ``/lib/systemd/system/ihatemoney.service`` path may change depending on your distribution.
|
||||
.. [#systemd-services] ``/etc/systemd/system/ihatemoney.service`` path may change depending on your distribution.
|
||||
|
||||
With Docker
|
||||
-----------
|
||||
|
|
Loading…
Reference in a new issue