How to deploy Django application on AWS Ubuntu EC2 - (Development & Debug)
--WinSCP
--
--EC2 - File
Transfer
--
Ec2 setup
1) Create ec2 instance
2) Download and keep private key file
3) Download WinSCP and install
4) Open WinSCP and configure it
WinSCP configurations
1) File protocol - SFTP
2) Host name - (Public IPv4 DNS from instance description)
3) Port - 22
4) Username - (ubuntu)
5) Goto advanced and upload private key (.ppk file)
6) Login
Source setup
1) Drag and drop the project to WinSCP window
2) Install python and django
sudo apt update & sudo apt upgrade
sudo apt install python3
pip install Django==2.2
Create the requirement modules list
pip3 freeze > requirements.txt
Intall required modules
pip install -r /path/to/requirements.txt
Install mysqlclient
sudo apt-get install libmysqlclient-dev
pip install mysqlclient
MySQL
Setup Mysql
Run
Run
python3 manage.py runserver 0:8000
EC2 Configure
Add inbound rule
Custom TCP - 8000 - 0.0.0.0/0
Access
Get Public IPv4 DNS from instance description
Goto browser try this url -> dns_url:8000