Files
servercode/python3-venv-django-uwsgi

23 lines
590 B
Plaintext

# https://tonyteaches.tech/django-nginx-uwsgi-tutorial/
which python3
# sudo apt install python3 python3-pip
# INSTALL PYTHON VIRTUAL ENVVIRONMENT
sudo apt-get install python3-venv
mkdir ~/env
python3 -m venv ~/env/mypyenv
ls env/mypyenv/bin
source ~/env/mypyenv/bin/activate
which python
pip install Django
django-admin startproject py1
cd py1
# TEST DJANGO PYTHON INCLUDED WEBSERVER ONLY
# python manage.py runserver 0.0.0.0:8000
sudo apt-get install python3-dev
# sudo apt-get install gcc
pip install uwsgi
# uwsgi --http :8000 --wsgi-file test.py
uwsgi --http :8000 --module py1.wsgi