- Clone the code from git (github/bitbucket/gitlab)
- Install the dependency
- run the server with port (8000/your choice)
- run the celery worker (if needed)
- run the celery beat (if needed)
- run any other service (if needed)
You can run multiple application in different port and add the port in nginx configuration file with domain name
- Install nginx
- Configure nginx
- Create a file in
/etc/nginx/sites-available/
with nameyour_domain_name
(for example: nano /etc/nginx/sites-available/your_domain_name) - Add the following code in the file
server { listen 80; server_name your_domain_name; location / { proxy_pass http://localhost:8000; } }
- Create a symlink in
/etc/nginx/sites-enabled/
with nameyour_domain_name
(for example: ln -s /etc/nginx/sites-available/your_domain_name /etc/nginx/sites-enabled/your_domain_name)
- Create a file in
- Check the nginx configuration (for example: sudo nginx -t)
- Restart nginx (for example: sudo service nginx restart)
map the domain name with your server ip address with A record in DNS server