From ad01be02f0a72dc8cabb917a3c0d0d1b93052f2f Mon Sep 17 00:00:00 2001 From: Blackwhitebear8 Date: Mon, 9 Dec 2024 16:46:47 +0100 Subject: [PATCH] Update createvm.service --- createvm.service | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/createvm.service b/createvm.service index 2212280..d253460 100644 --- a/createvm.service +++ b/createvm.service @@ -3,8 +3,15 @@ Description=Create VM service After=network.target [Service] -ExecStart=/usr/bin/python3 /opt/createvm-web/app.py -WorkingDirectory/opt/createvm-web +# Activatie van de virtuele omgeving +Environment="VIRTUAL_ENV=/opt/create-vm/.venv" +Environment="PATH=/opt/createvm-web/.venv/bin:/usr/bin" + +# Command dat je app start +ExecStart=/opt/createvm-web/.venv/bin/python3 /opt/createvm-web/app.py + +# Werkomgeving van de applicatie +WorkingDirectory=/opt/createvm-web User=root Restart=always StandardOutput=syslog