I developed simple web page using django and for second week struggling trying to launch it. I have no background in server managing so everything I do is new to me. During my trials I have read countless tutorials and did not managed to get my website up and running (and it drives me insane). For now I am trying to follow this tutorial. I am at the part there I need to create Gunicorn systemd Service File
, but because my project structure is little bit different I can't figure way how to do it correctly.
My project structure would be like this:
user: gdmin
Everything held in parent folder named skdir
and in subfolders within in it. Below I tried to visualize it in tree view structure (not all files shown, just the ones i thought important):
skdir/
myenv/
bin/
gunicorn
STV_skaiciuokle/
skaiciuokle_web/
manage.py
skaiciuokle_web/
settings.py
static/
js
css
img
media
To make everything more clear my manage.py file is in skdir/STV_skaiciuokle/skaiciuokle_web
directory.
My current gunicorn.service
configured like this (not working):
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=gdmin
Group=www-data
WorkingDirectory=/home/gdmin/skdir
ExecStart=/home/gdmin/skdir/myenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/gdmin/skdir/STV_skaiciuokle/skaiciuokle_web/skaiciuokle_web.sock skaiciuokle_web.wsgi:application
[Install]
WantedBy=multi-user.target
How should I correct it?
Also can somebody recommend good tutorial on this, something like "deploy Django for dummies" level?