{"id":19685986,"url":"https://github.com/shorotshishir/docker-django","last_synced_at":"2026-04-14T04:31:09.684Z","repository":{"id":123991217,"uuid":"388438373","full_name":"Shorotshishir/docker-django","owner":"Shorotshishir","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-22T11:33:53.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-11T12:16:44.782Z","etag":null,"topics":["django","django-container","docker","docker-compose","dockerfile","linux","python"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/Shorotshishir.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":"2021-07-22T11:29:21.000Z","updated_at":"2021-07-22T11:38:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"73d57b92-8ee1-40b6-b203-ddfe9f53dc5e","html_url":"https://github.com/Shorotshishir/docker-django","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shorotshishir/docker-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shorotshishir%2Fdocker-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shorotshishir%2Fdocker-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shorotshishir%2Fdocker-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shorotshishir%2Fdocker-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shorotshishir","download_url":"https://codeload.github.com/Shorotshishir/docker-django/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shorotshishir%2Fdocker-django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["django","django-container","docker","docker-compose","dockerfile","linux","python"],"created_at":"2024-11-11T18:25:13.917Z","updated_at":"2026-04-14T04:31:09.655Z","avatar_url":"https://github.com/Shorotshishir.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## django in docker\n\n## creating a docker container for django development\nthis is how i create my django base template inside docker\n\n## pre requisite\n_Follow the official installation guide_\n- docker-engine [link](https://docs.docker.com/engine/install/ubuntu/)\n- docker-compose [link](https://docs.docker.com/compose/install/)\n\n## Get Started\n- pull this repo\n- open directory in terminal\n- type\n    ```\n    docker-compose run web django-admin startproject \u003cname-of-your-project\u003e .\n    ```\n- this will first run the service named `web` defines in the `services` in `docker-compose.yml`\n- as it has dependency on db, db service will also start.\n- if command executed successfully a django project will be created. \n## Ownership of files\n- in `linux` all files will be `root` owned, meaning cant modify without sudo command.\n- type\n    ```\n    sudo chown -R $USER:$USER .\n    ```\n- this will make all `existing` files owner to local user, i.e. modifiable without root\n- Creating app using `python manage.py \u003cname-of-your-app\u003e` will make that `app owned by root`, thus run the above command again to get going.\n## Database Configuration\n- this repos uses postgres as the default `db`\n- change the default database of django in `settings.py` to \n    ```\n    DATABASES = {\n        'default': {\n            'ENGINE': 'django.db.backends.postgresql',\n            'NAME': 'postgres',\n            'USER': 'postgres',\n            'PASSWORD': 'postgres',\n            'HOST': 'pgdb',\n            'PORT': 5432,\n        }\n    }\n    ```\n- make sure the name, user and password of database matches with the data in `docker-compose.py`\n## Django based commands\n- to get access to the bash of docker type\n    ```\n    docker exec -it \u003ccontainer-id\u003e bash\n    ```\n- run all django related command in this bash, e.g. `python manage.py makemigrations` or `python manage.py migrate` or `python manage.py createsuperuser`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshorotshishir%2Fdocker-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshorotshishir%2Fdocker-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshorotshishir%2Fdocker-django/lists"}