1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/photonix_ynh.git synced 2024-09-03 19:56:29 +02:00
photonix_ynh/conf/app_server.service

16 lines
768 B
Desktop File

[Unit]
Description=Photonix app server
After=network.target postgresql.service redis-server.service
[Service]
Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/srv/photonix
EnvironmentFile=__INSTALL_DIR__/photonix.env
ExecStart=/usr/bin/env bash -c "PATH=__INSTALL_DIR__/venv/bin:$PATH __INSTALL_DIR__/venv/bin/python __INSTALL_DIR__/srv/photonix/manage.py rescan_photos && __INSTALL_DIR__/venv/bin/python __INSTALL_DIR__/srv/photonix/manage.py reset_redis_locks && __INSTALL_DIR__/venv/bin/python __INSTALL_DIR__/srv/photonix/manage.py housekeeping && __INSTALL_DIR__/venv/bin/gunicorn -b 0.0.0.0:$PHOTONIX_PORT web.wsgi"
StandardOutput=append:/var/log/__APP__/__APP__-app_server.log
StandardError=inherit
[Install]
WantedBy=multi-user.target