- rm -rf jssdeploy(프로젝트명)
- sudo apt-get update
- sudo apt-get install build-essential
- sudo apt-get install virtualenv
- cd jssdeploy
- cd jasoseolprojects
- virtualenv -p python3 venv
- source venv/bin/activate
- cd .. => requirements.txt 위치 확인 후
- pip install -r requirements.txt
-
python manage.py migrate
-
pip install uwsgi
-
sudo vi uwsgi.ini
[uwsgi] chdir=/home/ubuntu/jssdeploy/jasoseolproject module=jasoseolproject.wsgi:application master=True pidfile=/tmp/project-master.pid vacuum=True max-requests=5000 daemonize=/home/ubuntu/jssdeploy/jasoseolproject/django.log home=/home/ubuntu/jssdeploy/jasoseolproject/venv virtualenv=/home/ubuntu/jssdeploy/jasoseolproject/venv socket=/home/ubuntu/jssdeploy/jasoseolproject/uwsgi.sock chmod-socket=666
-
(esc) + (:wq)+(enter)
-
uwsgi --ini uwsgi.ini
-
sudo apt-get install nginx
-
sudo vi /etc/nginx/nginx.conf
- sudo vi /etc/nginx/sites-enabled/default
- python manage.py collectstatic
- uwsgi --ini uwsgi.ini
- sudo service nginx reload