From 454fd5e4667da70acf16df5d82a8773ef687d4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 4 Mar 2024 16:10:35 +0100 Subject: [PATCH] fix systemd services --- conf/systemd-beat.service | 4 ++-- conf/systemd-celery.service | 4 ++-- conf/systemd.service | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/systemd-beat.service b/conf/systemd-beat.service index b481eb0..42fe1f0 100644 --- a/conf/systemd-beat.service +++ b/conf/systemd-beat.service @@ -5,7 +5,7 @@ After=network.target postgresql.service redis.service __APP__.scoket [Service] User=__APP__ Group=__APP__ -WorkingDirectory=__INSTALL_DIR__ +WorkingDirectory=__INSTALL_DIR__/source ExecStart=__INSTALL_DIR__/venv/bin/envdir __INSTALL_DIR__/envs/prod __INSTALL_DIR__/venv/bin/celery -A __APP__ beat --pidfile /tmp/celerybeat.pid -S django ExecReload=/bin/kill -s HUP $MAINPID @@ -15,4 +15,4 @@ TimeoutStopSec=5 PrivateTmp=true [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/conf/systemd-celery.service b/conf/systemd-celery.service index d77afe3..e050e9d 100644 --- a/conf/systemd-celery.service +++ b/conf/systemd-celery.service @@ -5,7 +5,7 @@ After=network.target postgresql.service redis.service __APP__.socket [Service] User=__APP__ Group=__APP__ -WorkingDirectory=__INSTALL_DIR__ +WorkingDirectory=__INSTALL_DIR__/source ExecStart=__INSTALL_DIR__/venv/bin/envdir __INSTALL_DIR__/envs/prod __INSTALL_DIR__/venv/bin/celery -A __APP__ worker -l info -Ofair ExecReload=/bin/kill -s HUP $MAINPID @@ -15,4 +15,4 @@ TimeoutStopSec=5 PrivateTmp=true [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/conf/systemd.service b/conf/systemd.service index 6e5ad2a..bc603fc 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,9 +7,9 @@ Requires=__APP__.socket Type=notify User=__APP__ Group=__APP__ -WorkingDirectory=__INSTALL_DIR__/ +WorkingDirectory=__INSTALL_DIR__/source/ -ExecStart=__INSTALL_DIR__/venv/bin/envdir __INSTALL_DIR__/envs/prod __INSTALL_DIR__/venv/bin/gunicorn -c __INSTALL_DIR__/conf/gunicorn.conf.py mygpo.wsgi:application --bind unix:/run/__APP__.sock +ExecStart=__INSTALL_DIR__/venv/bin/envdir __INSTALL_DIR__/envs/prod __INSTALL_DIR__/venv/bin/gunicorn -c __INSTALL_DIR__/source/conf/gunicorn.conf.py mygpo.wsgi:application --bind unix:/run/__APP__.sock ExecReload=/bin/kill -s HUP $MAINPID Restart=on-failure KillMode=mixed