{"id":27940678,"url":"https://github.com/dockersamples/django-postgres-docker","last_synced_at":"2025-05-07T10:19:41.974Z","repository":{"id":264686360,"uuid":"894088696","full_name":"dockersamples/django-postgres-docker","owner":"dockersamples","description":"How to Dockerize a Django App with Postgres using Docker","archived":false,"fork":false,"pushed_at":"2024-11-26T01:51:22.000Z","size":28,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T10:19:03.279Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dockersamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2024-11-25T18:23:12.000Z","updated_at":"2025-04-04T04:01:59.000Z","dependencies_parsed_at":"2024-11-25T19:46:25.727Z","dependency_job_id":null,"html_url":"https://github.com/dockersamples/django-postgres-docker","commit_stats":null,"previous_names":["dockersamples/django-postgres-docker"],"tags_count":0,"template":false,"template_full_name":"dockersamples/sample-app-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdjango-postgres-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdjango-postgres-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdjango-postgres-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdjango-postgres-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dockersamples","download_url":"https://codeload.github.com/dockersamples/django-postgres-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252856555,"owners_count":21814858,"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-05-07T10:19:41.382Z","updated_at":"2025-05-07T10:19:41.950Z","avatar_url":"https://github.com/dockersamples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Django + Postgres + Docker Compose\n\nThis repo contains the sample application for containerising Django app with Postgres using Docker and Docker Compose.\n\nNotice: This sample repo is intended to support a blog post published in the official Docker blogging site. As such, the application code is purposely kept simple to keep the focus on the guide's content and should not be considered production-ready.\n\n### 1. Clone the repository\n\n ```bash\n  https://github.com/dockersamples/django-postgres-docker\n ```\n\n\n### 2. Navigate to the project directory:\n\n```\ncd django-postgres-docker\n```\n\n## 3. Create an .env file\n\n\n```\nDJANGO_SECRET_KEY=your_secret_key\nDEBUG=True\nDJANGO_LOGLEVEL=info\nDJANGO_ALLOWED_HOSTS=localhost\nDATABASE_ENGINE=postgresql_psycopg2\nDATABASE_NAME=dockerdjango\nDATABASE_USERNAME=dbuser\nDATABASE_PASSWORD=dbpassword\nDATABASE_HOST=db\nDATABASE_PORT=5432\n```\n\n## 4. Bring up the application\n\n```\ndocker compose up -d --build\n```\n\nThis command will download any necessary Docker images, build the project, and start the containers. \n\n\u003cimg width=\"584\" alt=\"image\" src=\"https://github.com/user-attachments/assets/09745514-7bac-4f19-9113-9025cc3bd739\"\u003e\n\n\n\nOnce complete, your Django application should be accessible at `http://localhost:8000`.\n\n\u003cimg width=\"993\" alt=\"image\" src=\"https://github.com/user-attachments/assets/583b2085-0e8d-4871-b493-e9726d0a44da\"\u003e\n\n\n\n\n## Maintenance Schedule\nThis repo is maintained frequently. For any security updates, note that there may be delays in applying recent fixes.\n\n## License\nThis project is licensed under the [Apache 2.0 License](/LICENSE).\n\n## Contributing\n\nSince this project is intended to support a specific use case guide, contributions are limited to bug fixes or security issues. If you have a question, feel free to open an issue!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockersamples%2Fdjango-postgres-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdockersamples%2Fdjango-postgres-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockersamples%2Fdjango-postgres-docker/lists"}