Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muratenes/djangoautodeploy
Django App serve on your server
https://github.com/muratenes/djangoautodeploy
Last synced: 17 days ago
JSON representation
Django App serve on your server
- Host: GitHub
- URL: https://github.com/muratenes/djangoautodeploy
- Owner: muratenes
- Created: 2021-01-15T10:18:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-15T10:33:39.000Z (almost 4 years ago)
- Last Synced: 2024-11-05T13:12:17.656Z (2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## # Info
Django auto deployment with nginx and gunicorn
## #Prerequisite
- You should be firstly upload your website to github#### Install the dependencies for server.
- Prepare to server for deploy your django project
```sh
sudo apt-get update
sudo apt-get install nginx python3-pip python3-dev git
sudo apt-get install virtualenv
```## # Django Requirements
- you must be create **requiments.txt** on your project folder and it's be contain
django requirements ex is below
```sh
django==2.0
Pillow==2.0
```
or just execute below command on local terminal for create requirements.txt
pip3 freeze -> requirements.txt
### Bind Nginx And Gunicorn Config
you must be bind this fields on index.py example is below
```sh
SiteConfig.site_folder_name = "site_folder_name" # only site folder name ex: autoDeployDjango
SiteConfig.project_name = "project_name" # your site project name when created django-admin startproject mysite
SiteConfig.domain_list = "domain_list" # nginx domain list its must be string and 1 space each domain ex:"mydomain.com www.mydomain.com"
SiteConfig.static_files_folder = "static_files_folder" # django static file folder name ex:"staticfiles"
SiteConfig.media_files_folder = "media_files_folder" # django media file folder name ex:"media"
SiteConfig.virtual_env_name = "virtual_env_name" # django virtual environment file folder name ex:"venv"
SiteConfig.github_repo_url = "github_repo_url " # your web site github repo url ex : "https://github.com/your_username/your_repo_url.git"
SiteConfig.requirements_file_name = "requirements_file_name" # this required for package requirements ex:"requirements.txt"
```### How to delete old web site configuration on server ?
if you want to delete old nginx,gunicorn and other configuration files on your server you must be run this command on
main folder```sh
python3 manage.py delete-old
```