diff --git a/tasks/main.yml b/tasks/main.yml index 0dd0a6f..0b5cfc7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -21,6 +21,7 @@ - name: 'download latest im stable' get_url: dest: "{{im_home}}/im-latest.tar.gz" + url: https://gitea.caret.be/jens/im/archive/main.tar.gz owner: im group: im mode: '0400' diff --git a/templates/im.service.j2 b/templates/im.service.j2 index 255171c..636b8ee 100644 --- a/templates/im.service.j2 +++ b/templates/im.service.j2 @@ -3,9 +3,9 @@ Description=im pantry inventory management server trought gunicorn After=network.target [Service] -User={{ im_user }} +User=root WorkingDirectory={{ im_home }}/im -ExecStart=gunicorn --workers {{im_workers}} --bind {{ im_http_listen }}:{{ im_http_port }} im.wsgi:application +ExecStart=gunicorn -g={{im_user}} -u={{im_user}} --workers {{im_workers}} --bind {{ im_http_listen }}:{{ im_http_port }} im.wsgi:application Restart=on-failure