Steps to Push Django Project
Follow these steps to successfully deploy your Django project to your local Proxmox server.
Step 1
Django Init
Choose a project name
Step 1
Django Init
⚠️ if the project is copied, remove .git folder
Step 1
Django Init
⚠️ if the project is copied, delete db.sqlite3
Step 1
Django Init
Design a simple Django with AI
Step 1
Django Init
Check the DB config and run migrations
Step 1
Django Init
Check that the Django app start wells
Step 2
Proxmox Server Setup
Proxmox Server Setup
Step 2
Proxmox Server Setup
Connect to proxmox
Step 2
Proxmox Server Setup
Create LXC
Step 2
Proxmox Server Setup
Choose root password
Step 2
Proxmox Server Setup
First step SSH Key
Step 2
Proxmox Server Setup
Update KB
Step 2
Proxmox Server Setup
Choose IP address
Step 2
Proxmox Server Setup
Test local connection with SSH
Step 3
Router configuration
Router configuration
Step 3
Router configuration
DHCP Binding
Step 3
Router configuration
Port Forwarding Web
Step 3
Router configuration
Port Forwarding SSH
Step 3
Router configuration
Test external connection with SSH
Step 4
SSH configuration
Open KB
Step 4
SSH configuration
Edit ssh config and update it with the new IP
Step 4
SSH configuration
Define ssh lxc-107
Step 4
SSH configuration
Test locally ssh lxc-107
Step 5
Production settings
Production settings
Step 5
Production settings
Configure production database settings
Step 5
Production settings
Set DEBUG = False
Step 5
Production settings
Configure ALLOWED_HOSTS
Step 5
Production settings
Set up static files configuration
Step 6
GitHub Repository
Create .gitignore file
Step 6
GitHub Repository
Open Source Control panel
Step 6
GitHub Repository
Initialize repository
Step 6
GitHub Repository
Stage all files
Step 6
GitHub Repository
Create initial commit
Step 6
GitHub Repository
Publish to GitHub
Step 6
GitHub Repository
Configure repository settings
Step 6
GitHub Repository
Verify repository creation
Step 7
GitHub Setup
Update GitHub Secrets at a directory level
Step 7
GitHub Setup
Update Deployment Workflow
Step 8
LXC Environment Setup
Connect to LXC container
Step 8
LXC Environment Setup
Update system packages
Step 8
LXC Environment Setup
Install Python and pip
Step 8
LXC Environment Setup
Install Nginx
Step 8
LXC Environment Setup
Install Git
Step 9
Django Deployment
Open powershell as admin
Step 9
Django Deployment
Create project directory
Step 9
Django Deployment
Generate SSH key pair
Step 9
Django Deployment
Update knowledge site
Step 9
Django Deployment
Start SSH agent
Step 9
Django Deployment
Add SSH key to agent
Step 9
Django Deployment
Check displayed keys
Step 9
Django Deployment
Display public key
Step 9
Django Deployment
Add SSH key to GitHub
Step 9
Django Deployment
Test SSH connection .. must be sucess ❤️
Step 9
Django Deployment
Clone GitHub repository
Step 9
Django Deployment
Navigate to project directory
Step 9
Django Deployment
Create virtual environment
Step 9
Django Deployment
Activate virtual environment
Step 9
Django Deployment
Install requirements: Gunicorn, Postgres ...
Step 9
Django Deployment
Configure SSH agent auto-start
View .bashrc Configuration Guide
Step 9
Django Deployment
Save and reload bashrc
Step 9
Django Deployment
Verify SSH agent auto-start
Step 10
Database Setup
Install PostgreSQL
Step 10
Database Setup
Switch to postgres user
Step 10
Database Setup
Create database
Step 10
Database Setup
Create database user
Step 10
Database Setup
Grant privileges
Step 10
Database Setup
Exit PostgreSQL
Step 11
Django Configuration
Check settings_production.py
Step 11
Django Configuration
Remove settings.py
Step 11
Django Configuration
Move settings_production.py to settings.py
Step 11
Django Configuration
Check settings
Step 11
Django Configuration
Set DEBUG = False
Step 11
Django Configuration
Set ALLOWED_HOSTS to IP/domain
Step 11
Django Configuration
Configure PostgreSQL database
Step 11
Django Configuration
Set production SECRET_KEY
Step 11
Django Configuration
Configure static files for production
Step 11
Django Configuration
Run migrations
Step 11
Django Configuration
Collect static files
Step 11
Django Configuration
Create superuser .. and update Login.xlsx
Step 11
Django Configuration
Test Django server
Step 12
Gunicorn Setup
Create Gunicorn service file
Step 12
Gunicorn Setup
Configure Gunicorn service
Step 12
Gunicorn Setup
Reload systemd daemon
Step 12
Gunicorn Setup
Enable Gunicorn service
Step 12
Gunicorn Setup
Start Gunicorn service
Step 12
Gunicorn Setup
Check Gunicorn status
Step 12
Gunicorn Setup
Restart & logs
Step 13
Nginx Configuration
Create Nginx configuration file
Step 13
Nginx Configuration
Remove default site
Step 13
Nginx Configuration
Verify proxy/static config
Step 13
Nginx Configuration
Enable Nginx site
Step 13
Nginx Configuration
Inspect effective config and enabled sites
Step 13
Nginx Configuration
Test Nginx configuration
Step 13
Nginx Configuration
Restart Nginx
Step 14
Firewall Configuration
Allow HTTP traffic
Step 14
Firewall Configuration
Allow HTTPS traffic
Step 14
Firewall Configuration
Allow SSH traffic
Step 14
Firewall Configuration
Enable firewall
Step 14
Firewall Configuration
Display active firewall rules
Step 15
SSL Certificate
Install Certbot
Step 15
SSL Certificate
Obtain SSL certificate
Step 16
Final Testing
Test website locally
Step 16
Final Testing
Test website externally
Step 16
Final Testing
Test admin interface and connect
Step 16
Final Testing
Check logs for errors
Step 17
CI/CD Setup
Setup SSH key
Step 17
CI/CD Setup
Create GitHub Actions workflow
Step 17
CI/CD Setup
Add GitHub Secrets for automated deployment
Step 17
CI/CD Setup
Run the Test Workflow
Step 17
CI/CD Setup
Test automated deployment