HI Guys
Anyone can help me regarding to deployment process :
etc/systemd/system/gunicorn.socket -----[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
[Install]
WantedBy=sockets.target
/etc/systemd/system/gunicorn.service ----
[Unit]
Description=Gunicorn service
Requires=gunicorn.sock
After=network.target
[Service]
User=ubuntu
Group=www-data
WordkDirectory=/home/ubuntu/PocEnvironment
Environment="PATH=/PocEnvironment/env/bin"
ExecStart=/usr/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
PocEnvironment.src.runner:application
[Install]
WantedBy=multi-user.target
/etc/nginx/sites-enabledserver{
listen 80;
server_name {IP Address};
location /static/ {
root /home/ubuntu/PocEnvironment;
}
location / {
include proxy_params;
proxy_pass <http://unix>:/run/gunicorn.sock;
# proxy_pass <http://0.0.0.0:8000>;
}
}
Applied these commands:
sudo systemctl daemon-reload
sudo systemctl restart gunicorn
sudo systemctl status gunicorn