{"id":26878898,"url":"https://github.com/logicify/docker-django","last_synced_at":"2025-03-31T12:31:42.497Z","repository":{"id":45815400,"uuid":"59378496","full_name":"Logicify/docker-django","owner":"Logicify","description":"Django hosted with gunicorn behind nginx","archived":false,"fork":false,"pushed_at":"2020-02-03T09:49:17.000Z","size":15,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-15T03:17:54.305Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Logicify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-21T19:43:19.000Z","updated_at":"2020-07-24T03:33:19.000Z","dependencies_parsed_at":"2022-08-03T05:45:30.279Z","dependency_job_id":null,"html_url":"https://github.com/Logicify/docker-django","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logicify%2Fdocker-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logicify%2Fdocker-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logicify%2Fdocker-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logicify%2Fdocker-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Logicify","download_url":"https://codeload.github.com/Logicify/docker-django/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246468770,"owners_count":20782578,"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-03-31T12:30:29.213Z","updated_at":"2025-03-31T12:31:42.492Z","avatar_url":"https://github.com/Logicify.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base image for django deployments\n\n[![](https://images.microbadger.com/badges/image/logicify/django.svg)](https://microbadger.com/images/logicify/django \"Get your own image badge on microbadger.com\")\n\nThis image is useful if you want to create **production setup** for your django application.\nEssentially it runs 2 processes:\n\n* [gunicorn](http://gunicorn.org/) which actually hosts your django aplication\n* [Nginx](https://nginx.org/en/) which serves static files and proxies the rest of requests to gunicorn\n  \n## Requirements\n\n1. You should put you django application code into the following folder of the image: `/srv/application`\n1. Static files should be located under `/srv/static`\n1. You need to point your application to put media into `/srv/media`. \n1. It is required to pass env variable `APP_MODULE` which contains the name of the module to be used as wsgi entry point.\nE.g. `your_app.wsgi`\n\nEnsure you updated your django settings accordingly (especially `MEDIA_ROOT` and `STATIC_ROOT`).\n \n## Examples\n\nHere is an example of the Dockerfile which creates an image from the source code (it might be run on CI server \nas a part of build process):\n\n```\nFROM logicify/django:1.1\n\nCOPY build/code /srv/application\nCOPY build/static /srv/static\n\nRUN source /srv/virtenv/bin/activate \u0026\u0026 \\\n    LANG=en_US.utf8 pip install -r requirements.txt\n\nENV APP_MODULE \"our_app.wsgi\"\nENV APP_PROCESS_NAME \"our-app-name\"\n\n```\n\nSo basically what it does is copying files from the build folder into valid locations, setting up all dependencies an \nrequired variables. As result you have ready to deploy image.\n\n## Supported Variables\n\n* **PROXY_TIMEOUT** - timeout in seconds for nginx proxy (default `90`)\n* **STATIC_URL** - url path for static files hosting (default `/static`)\n* **STATIC_PATH** - location on the file system where nginx should find static files (`/srv/static`)\n* **MEDIA_PATH** - location on the file system where nginx should find media files (`/srv/media`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicify%2Fdocker-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogicify%2Fdocker-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicify%2Fdocker-django/lists"}