forked from glowlex/2017_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·50 lines (40 loc) · 1.46 KB
/
setup.sh
File metadata and controls
executable file
·50 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#запускать с sudo из 2017_python
# в конфиге нжинх поменять путь если надо или скачивать в /opt/project/
#sudo -s
add-apt-repository -y ppa:jonathonf/python-3.6
apt-get update -y
apt-get install -y nginx
apt-get install -y python3.6
apt-get install -y python3-pip
pip3 install --upgrade pip
pip3 install --upgrade virtualenv
virtualenv -p python3.6 pestyle
source ./pestyle/bin/activate
pip3 install -r ./requirements.txt
#pip3 install django==1.11
#easy_install Celery
#pip3 install gunicorn
#pip3 install Pillow
#библиотека для заполнения базы
#pip3 install requests
cp -f ./pestyle_nginx.conf /etc/nginx/sites-available/
ln -s /etc/nginx/sites-available/pestyle_nginx.conf /etc/nginx/sites-enabled/
service nginx restart
python ./msite/manage.py collectstatic
cd ./msite
gunicorn msite.wsgi:application -c ./gunicorn.conf.py
#для запуска отладочного серва джанги и прочая полезная хуйня
#python manage.py createsuperuser
#python manage.py makemigrations pestyle
#python manage.py migrate
#python manage.py runserver
#python -Wall manage.py test
#запуск заполнения базы
#python manage.py fill
#python manage.py migrate --database=test_db
#python manage.py dumpdata --database=test_db -o ./test_db.json
#для locale error
#export LC_ALL="en_US.UTF-8"
#export LC_CTYPE="en_US.UTF-8"
#sudo dpkg-reconfigure locales