A search engine for recipes.
- Install python3:
yum install python37
- Install virtualenv:
- Add environment variables:
- Create virtual environment:
pip3 install virtualenv
PATH=$PATH:/usr/local/bin
virtualenv -p /usr/bin/python3 djangoenv
- Install git:
- Download the project:
- Switch to dev branch:
yum install git
git clone https://github.com/crystal-xu/ttdsCW3.git
git checkout dev
- Enter the virtual environment:
- Install libraries:
source djangoenv/bin/active
pip install -r requirements.txt
- Install uwsgi:
- Start uwsgi:
pip install gcc python3-devel uwsgi
uwsgi --ini uwsgi.ini
- Install nginx:
- Configure nginx:
- Switch to root user
- Add configurations
- Start nginx
sudo amazon-linux-extras install nginx1
/etc/nginx/nginx.conf
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
}
location /static {
alias /root/ttdsCW3/static;
}