Video and Audio Calling with WebRtc in Django
virtualenv virtual/webrtc -p python3
pip3 install django
django-admin startproject webrtc
django-admin startproject webrtc .
pip3 install Pillow
pip3 install django-extensions
pip3 install djangorestframework
pip3 install django-rest-auth
pip3 install django-cors-headers
pip3 install django-filter
pip3 install django-froala-editor
pip3 install django-ckeditor
pip3 install fcm_django
pip3 install mysqlclient
LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient
pip3 freeze > requirements.txt
django-admin startproject webrtc
python manage.py startapp home
python manage.py startapp blog
python manage.py runserver
python manage.py runserver 8080
python manage.py runserver 0:8000
python manage.py runserver 192.168.1.4:8000
python manage.py createsuperuser
python manage.py changepassword username
python manage.py makemigrations
python manage.py makemigrations blog
python manage.py migrate
python manage.py migrate blog
python manage.py migrate --fake
python manage.py migrate blog --fake
export DJANGO_SETTINGS_MODULE=webrtc.settings.local
DJANGO_SETTINGS_MODULE=webrtc.settings.local python manage.py runserver
DJANGO_SETTINGS_MODULE=webrtc.settings.testing python manage.py runserver
DJANGO_SETTINGS_MODULE=webrtc.settings.staging python manage.py runserver
DJANGO_SETTINGS_MODULE=webrtc.settings.circleci python manage.py runserver
DJANGO_SETTINGS_MODULE=webrtc.settings.production python manage.py runserver
python manage.py runserver
python manage.py collectstatic
python manage.py collectstatic --noinput
python manage.py collectstatic --noinput --clear
Before install channels_redis we need to install Redis server with Docker or Direct on our server and run it before using We will use a channel layer that uses Redis as its backing store. To start a Redis server with Docker on port 6379, run the following command:
docker run -p 6379:6379 -d redis:2.8
For Mac you can Install and Start Redis by these Commands and also check redis info
brew install redis
brew services start redis
brew info redis
For Ubuntu you can Install and Start Redis Server by these commands and also check redis info
sudo apt install redis-server
sudo systemctl status redis
sudo systemctl restart redis.service
After Running Redis Server you can Install redis for Channels with This Command
pip3 install channels_redis
pip3 install -U channels
Create a routing.py file in Project Directory Add ASGI_APPLICATION into your settings.py file
Download and install the Heroku CLI.
If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
$ heroku login
heroku create webrtc
heroku buildpacks:set heroku/python
heroku create webrtc --buildpack heroku/python
git --version
git init
heroku git:remote -a webrtc
web: gunicorn webrtc.wsgi
pip3 install gunicorn
pip3 install django-heroku
import django_heroku
django_heroku.settings(locals())
https://devcenter.heroku.com/articles/django-app-configuration
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webrtc.settings.heroku')
pip3 freeze > requirements.txt
git status
git add .
git commit -m "Project Initial Setup"
git push heroku master
heroku config:set DISABLE_COLLECTSTATIC=1
heroku run bash
python3 manage.py migrate
python3 manage.py createsuperuser
heroku logs --tail
###Thanks for Reading...###