dj chat
1.0.0
Project address reference: http://106.55.162.109:8888/ Account: admin Password: xhongc
python manage.py runserver 8088 or daphne -b 127.0.0.1 -p 8088 dj_chat.asgi:applicationnginx + daphne + gunicorn + supervisor
tips: gunicorn and daphne open different ports!
server {
listen 80 ;
server_name 106.55.162.109 ;
charset utf-8;
client_max_body_size 75M ;
location /static {
alias /home/ubuntu/dj-chat/static;
}
access_log /home/ubuntu/chat_log/access.log;
error_log /home/ubuntu/chat_log/error.log;
location / {
proxy_pass http://127.0.0.1:8000;
include /etc/nginx/uwsgi_params;
}
location /ws {
proxy_pass http://127.0.0.1:8001;
proxy_http_version 1.1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "upgrade" ;
proxy_redirect off ;
proxy_set_header Host $host ;
proxy_set_header X-Real-IP $remote_addr ;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
proxy_set_header X-Forwarded-Host $server_name ;
proxy_read_timeout 36000s ;
proxy_send_timeout 36000s ;
}
root /var/www/html;
index boot_chat.html;
}
docker-compose build
docker-compose up -dDetailed process jumps to Docker deployment application Django+daphne+Gunicorn+Nginx+Redis