debmaker/ressources/babybuddy/rootfs/usr/lib/systemd/system/babybuddy.service

21 lines
702 B
SYSTEMD
Raw Permalink Normal View History

2023-05-01 00:17:30 +02:00
[Unit]
Description=babybuddy
After=network.target
[Service]
User=babybuddy
Group=babybuddy
EnvironmentFile=/etc/default/babybuddy
ExecStartPre=python3 -m venv /var/lib/babybuddy/.venv
ExecStartPre=/var/lib/babybuddy/.venv/bin/pip install -r /usr/share/babybuddy/requirements.txt
ExecStartPre=/var/lib/babybuddy/.venv/bin/python3 /usr/share/babybuddy/manage.py migrate
ExecStartPre=/var/lib/babybuddy/.venv/bin/python3 /usr/share/babybuddy/manage.py createcachetable
ExecStart=/var/lib/babybuddy/.venv/bin/python3 /usr/share/babybuddy/manage.py runserver 0.0.0.0:8000
WorkingDirectory=/var/lib/babybuddy
StandardOutput=inherit
StandardError=inherit
Restart=always
[Install]
WantedBy=multi-user.target