{"id":28288861,"url":"https://github.com/devwhodevs/django-postgresql-docker-boilerplate","last_synced_at":"2026-01-25T22:51:09.787Z","repository":{"id":252640475,"uuid":"330799211","full_name":"devwhodevs/django-postgresql-docker-boilerplate","owner":"devwhodevs","description":"Boilerplate for quick warm up of Python django \u0026 postgres projects","archived":false,"fork":false,"pushed_at":"2021-01-18T22:21:13.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T15:44:02.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/devwhodevs.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-01-18T22:12:45.000Z","updated_at":"2021-01-18T22:21:16.000Z","dependencies_parsed_at":"2024-08-11T13:08:51.255Z","dependency_job_id":null,"html_url":"https://github.com/devwhodevs/django-postgresql-docker-boilerplate","commit_stats":null,"previous_names":["devwhodevs/django-postgresql-docker-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devwhodevs/django-postgresql-docker-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwhodevs%2Fdjango-postgresql-docker-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwhodevs%2Fdjango-postgresql-docker-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwhodevs%2Fdjango-postgresql-docker-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwhodevs%2Fdjango-postgresql-docker-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devwhodevs","download_url":"https://codeload.github.com/devwhodevs/django-postgresql-docker-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwhodevs%2Fdjango-postgresql-docker-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28761056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:56:06.009Z","status":"ssl_error","status_checked_at":"2026-01-25T20:54:48.203Z","response_time":113,"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":[],"created_at":"2025-05-22T00:13:41.279Z","updated_at":"2026-01-25T22:51:09.782Z","avatar_url":"https://github.com/devwhodevs.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Create a Django project\n\nIn this step, you create a Django starter project by building the image from the build context defined in the previous procedure.\n\nChange to the root of your project directory.\n\nCreate the Django project by running the docker-compose run command as follows.\n\n```sh \n    $ sudo docker-compose run web django-admin startproject projectname .\n```\n\nThis instructs Compose to run django-admin startproject composeexample in a container, using the web service’s image and configuration. Because the web image doesn’t exist yet, Compose builds it from the current directory, as specified by the build: . line in docker-compose.yml.\n\nOnce the web service image is built, Compose runs it and executes the django-admin startproject command in the container. This command instructs Django to create a set of files and directories representing a Django project.\n\nAfter the docker-compose command completes, list the contents of your project.\n\n```sh \n$ ls -l\n\ndrwxr-xr-x 2 root   root   composeexample\n-rw-rw-r-- 1 user   user   docker-compose.yml\n-rw-rw-r-- 1 user   user   Dockerfile\n-rwxr-xr-x 1 root   root   manage.py\n-rw-rw-r-- 1 user   user   requirements.txt\n```\n\nIf you are running Docker on Linux, the files django-admin created are owned by root. This happens because the container runs as the root user. Change the ownership of the new files.\n\n\n```sh\n$ sudo chown -R $USER:$USER .\n```\n\nIf you are running Docker on Mac or Windows, you should already have ownership of all files, including those generated by django-admin. List the files just to verify this.\n\n```sh \n$ ls -l\n\ntotal 32\n-rw-r--r--  1 user  staff  145 Feb 13 23:00 Dockerfile\ndrwxr-xr-x  6 user  staff  204 Feb 13 23:07 composeexample\n-rw-r--r--  1 user  staff  159 Feb 13 23:02 docker-compose.yml\n-rwxr-xr-x  1 user  staff  257 Feb 13 23:07 manage.py\n-rw-r--r--  1 user  staff   16 Feb 13 23:01 requirements.txt\n```\n\n# Connect the database\nIn this section, you set up the database connection for Django.\n\nIn your project directory, edit the composeexample/settings.py file.\n\nReplace the DATABASES = ... with the following:\n\n## settings.py\n```py\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'NAME': 'postgres',\n        'USER': 'postgres',\n        'PASSWORD': 'postgres',\n        'HOST': 'db',\n        'PORT': 5432,\n    }\n}\n```\n\nThese settings are determined by the postgres Docker image specified in docker-compose.yml.\n\nFull guide can be found at DockerHub quickstart.\n\nhttps://docs.docker.com/compose/django/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwhodevs%2Fdjango-postgresql-docker-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevwhodevs%2Fdjango-postgresql-docker-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwhodevs%2Fdjango-postgresql-docker-boilerplate/lists"}