{"id":24505588,"url":"https://github.com/kamaroly/django-docker-gunicorn-nginx","last_synced_at":"2025-03-15T08:41:52.303Z","repository":{"id":68916597,"uuid":"577188949","full_name":"kamaroly/django-docker-gunicorn-nginx","owner":"kamaroly","description":"Repo I used to learn about deployment of Django applications using docker gunicorn and the nginx","archived":false,"fork":false,"pushed_at":"2023-02-15T17:53:58.000Z","size":8,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T23:33:01.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamaroly.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-12T07:10:37.000Z","updated_at":"2022-12-12T07:13:25.000Z","dependencies_parsed_at":"2023-03-24T11:19:56.495Z","dependency_job_id":null,"html_url":"https://github.com/kamaroly/django-docker-gunicorn-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Fdjango-docker-gunicorn-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Fdjango-docker-gunicorn-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Fdjango-docker-gunicorn-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Fdjango-docker-gunicorn-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamaroly","download_url":"https://codeload.github.com/kamaroly/django-docker-gunicorn-nginx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707298,"owners_count":20334614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T23:30:35.989Z","updated_at":"2025-03-15T08:41:52.281Z","avatar_url":"https://github.com/kamaroly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Docker Gunicorn Nginx Deployment\n\nI wrote this repository as an exercise to learn how to deploy Django application on production using Docker Gunicorn and the Nginx server.\n\n`python manage.py runserver` is sufficient for development but not optimized and safe for production.\n\n## Gunicorn\n\nIt helps us start run django application for production. It makes it possible to run multiple worker and it rebootes them when they fail automatically. It is optimized for production.\n\nEach Django application comes with a `wsgi.py` file that makes it possible to run it with **gunicorn** server.\n\n\u003e gunicorn does not serve static files, thus, we need to leverage nginx proxy for that.\n\n## Nginx proxy\n\nNginx has been the favorite web server for millions of use and it is being used in millions of production servers. In this setup it helps us to do two 2 things\n\n1. Serves as **proxy** to gunicorn server at port 8000\n2. Serves static files from the docker volume called `static` if the request comes with first URL segment `/static/`\n\nThe combination of the gunicorn and nginx makes it possible to run django application in production mode with full assurance of security and production ready optimization.\n\n# TODO\n\n1. Generalize this repository so that other developer can use it for their django app deployments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamaroly%2Fdjango-docker-gunicorn-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamaroly%2Fdjango-docker-gunicorn-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamaroly%2Fdjango-docker-gunicorn-nginx/lists"}