-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
notes
132 lines (81 loc) · 2.57 KB
/
notes
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
mkvirtualenv collaborate-djangular
sudo -H pip install -r requirements.txt
sudo npm install -g bower
npm install
sudo bower install --allow-root
source ~/Collaborate-It/collaborate-djangular/bin/activate
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
delete db file
git rm -r cached .
run :
workon collaborate-djangular
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 8001
cd frontend
node app.js
redis-server
aws instance:
sudo apt-get install mysql-server
mysql_secure_installation
sudo apt-get install libmysqlclient-dev
install redis, etc
mysql -u root -p, then
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'admin'@'localhost';
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8000
nohup node app.js &
ps -ef (to check all background processes)
kill id_number
for heroku:
heroku create name
heroku git:remote -a name
git init
git add -A
git commit -m "a"
git push heroku master
debug in heroku:
heroku logs (in that repo)
local:
heroku local web
ssh:
heroku run bash
heroku open
i have to replace localhost with public IP every where where localhost is written
and run python manage.py runserver publicIP:8001
RTC:
easyrtc and angular easyrtc in Collaborate_it old folder
https://github.com/priologic/easyrtc/blob/master/docs/easyrtc_server_install.md
https://github.com/priologic/easyrtc/blob/master/docs/easyrtc_client_tutorial.md
https://github.com/priologic/easyrtc
https://www.youtube.com/watch?v=jynBIPkoNNY
https://easyrtc.com/docs/easyrtc_with_other_servers.php
final:
sudo apt-get install libcurl4-openssl-dev
sudo -H pip install -r requirements.txt
sudo apt-get install nodejs
sudo apt-get install npm
apt install nodejs-legacy
sudo pip install --upgrade django==1.9.1
python manage.py collectstatic
CollaborateIt_DEBUG=true python manage.py runserver
cd webrtc
sudo npm install
cd server
node server.js
whenever i update settings.py or urls.py, etc:
service gunicorn restart
nano /etc/nginx/sites-available/django
rsync -avz -e 'ssh' /path/to/local/dir user@remotehost:/path/to/remote/dir/
sublime on ssh:
https://hwcdi.com/blogpost/106/Subl_on_remote_Ubuntu
gunicorn -b 127.0.0.1:8001 CollaborateIt_project.wsgi:application
changess for domain: in nano /etc/nginx/sites-available/Collaborate-It
sudo service nginx restart
to do:
-add frontend folder on git
-when phase 2: show a codechef code