Deploying a Django-Vue application on AWS EC2 using NGINX
1. Create an EC2 instance
2. Create a PEM key
3. Connect to EC2
3-1. Navigate to the path where the PEM key is stored
3-2. Change access permissions
3-3. Connect to EC2 using the ssh command
ssh command4. Install the files needed for deployment on EC2
4-1. Install nvm
4-2. Install python 3.7
4-3. Set aliases in .bashrc
.bashrc4-4. Install node & npm
4-5. Install nginx
5. Configure Security Group
5-2. Create Security Group
5-2. Set Inbound Rules
6. Check nginx status
7. Clone the project to deploy
7-1. clone
7-2 Install required packages for Frontend & build
8. Prepare for serving
8-1. Modify nginx.conf
nginx.conf8-2. Modify sites-available
sites-available8-3. Restart nginx
9. MySQL Setup
9-1. Install
9-2. Set up root account
9-3. Try connecting with root account
9-4. Create database
10 . Configure .env file
.env file11. Set up backend virtual environment
11-1. Install pipenv
11-2. Activate the virtual environment
11-3. Install required packages
12. Configure gunicorn
12-1. Install gunicorn
12-2. gunicorn
gunicorn12-3. Verify it is running properly
12-4. Restart nginx
Redeployment
When backend is modified
When frontend is modified
Last updated