I'm using django and now trying to configure server with nginx and uwsi. now i'm running nginx+socket+uwsgi_emperor well . for running uwsgi i use below command in terminal:
/usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data
and it's working great. now i want add service with systemctl {start|stop|restart|status} uwsgi.service so i can easily use uwsgi. the problem here occur.here is /etc/systemd/system/uwsgi.service:
[Unit]
Description=uWSGI Emperor
After=syslog.target
[Service]
# i'm putting code same code of terminal exactly here:
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data
# Requires systemd version 211 or newer
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all
[Install]
WantedBy=multi-user.target
now when i start it with systemctl start uwsgi.service its running and i can see systemctl status uwsgi.service thaat is loaded well but when i want access the ip the error appear in journalctl -b -u uwsgi that shown my django can't access(read) the environment variable.because i using several environment variable in django's setting so without value of them django can't work correctly.why this happen?(when i running uwsgi in command line all is good but when i want use same command in systemctl django can't read environment variable and error occur ). thank you