{"id":13449060,"url":"https://github.com/eon01/django-boilerplate","last_synced_at":"2025-06-20T06:05:28.735Z","repository":{"id":38242629,"uuid":"262583047","full_name":"eon01/django-boilerplate","owner":"eon01","description":"An opinionated Django boilerplate running Celery \u0026 Django on the same Docker container and ready to run on Docker Compose \u0026 Kubernetes.","archived":false,"fork":false,"pushed_at":"2025-01-14T19:07:50.000Z","size":2601,"stargazers_count":38,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T12:54:56.697Z","etag":null,"topics":["boilerplate","django","docker","docker-compose","dockerfile","kubernetes","python"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/eon01.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,"zenodo":null}},"created_at":"2020-05-09T14:00:08.000Z","updated_at":"2024-08-15T19:24:03.000Z","dependencies_parsed_at":"2024-02-28T12:28:54.274Z","dependency_job_id":"89242ba6-b8bb-418e-9f01-ca2ab923b493","html_url":"https://github.com/eon01/django-boilerplate","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/eon01/django-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2Fdjango-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2Fdjango-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2Fdjango-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2Fdjango-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eon01","download_url":"https://codeload.github.com/eon01/django-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2Fdjango-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260891087,"owners_count":23077906,"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":["boilerplate","django","docker","docker-compose","dockerfile","kubernetes","python"],"created_at":"2024-07-31T06:00:29.771Z","updated_at":"2025-06-20T06:05:23.716Z","avatar_url":"https://github.com/eon01.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","python"],"sub_categories":[],"readme":"# Django Boilerplate\n\nAn opinionated Django boilerplate running Celery and Django on the same Docker container and ready to run on Kubernetes.\n\n![Screenshot](boilerplate/boilerplate/staticfiles/screenshot.jpg)\n\n## Features\n\n-  Docker Compose\n-  Kubernetes manifests\n-  Postgres as the default database\n-  A Dockerfile for each service\n-  Static files on S3 and CloudFront using Django Storages.\n-  A .env file for each service\n-  A base settings file with a separation between dev and prod environments\n-  Configured to run Celery on the same container as Django using s6-overlay\n-  Configured to run Redis in a separate container\n-  Cache configured and ready to run on disk and using Redis\n-  WSGI configured using gunicorn\n-  Commons libraries are installed:\n    -  Collectfast\n    -  django-health-check\n    -  django-select2\n    -  django_extensions\n    -  django-clear-cache\n    -  django-taggit\n    -  django-crispy-forms\n    -  django-debug-toolbar\n    -  sorl-thumbnail\n    -  django-css-inline\n    -  django-storages\n    -  django-redis\n    -  django-celery-beat\n    -  django-rest-framework\n\n## How to use\n\n0 - Grab a coffee.\n\n1 - Install, Docker and Docker Compose.\n\n2 - **Important**: Activate your virtual env if you are using one.\n\n```bash\nmkvirtualenv \u003cyour_project_name\u003e\n```\n\n3 - Clone/checkout and run:\n\n```bash\n# clone the project\ngit clone https://github.com/eon01/django-boilerplate \u003cyour_project_name\u003e\n# checkout to the branch you want to use (don't use the master branch)\ngit checkout django-4.2.10\n# cd into the project and run the init.sh script\ncd \u003cyour_project_name\u003e\n# run the init.sh script\nbash init.sh \u003cyour_project_name\u003e\n```\n\n4 - Update the .env file located at the root of the project with your own environment variables.\n\n```bash\nvi \u003cyour_project_name\u003e/.env\n```\n\n5 - Run Compose:\n\n```bash\ndocker compose up --build\n```\n\n## How to deploy to K8s\n\nStart by creating the namespace:\n\n```bash\nkubectl apply -f kubernetes/ns.yaml\n```\n\nThis is how to deploy using envsubst:\n\n```bash\nexport image=me/my-image:v0.01\nenvsubst \u003c kubernetes/$app.yaml | kubectl apply -f - \u0026\u0026 echo \"$image\" \u003e\u003e last.txt\n```\n\nA single line to create a tag (e.g: v0.0.1), build the image (e.g: gcr.io/my-project/my-app:0.0.1), push to a registry (e.g: gcr) and deploy to K8s:\n\n```bash\nexport v=0.0.1 \u0026\u0026 export app=my-app \u0026\u0026 export repos=gcr.io/my-project/$app \u0026\u0026 export image=$repos:$v \u0026\u0026 git add . \u0026\u0026 git commit -m \"v$v\"; git tag -a v$v -m \"Version $v\" \u0026\u0026 git push origin --tags \u0026\u0026 docker build $app/ -t $image -f $app/Dockerfile \u0026\u0026 docker push $image \u0026\u0026 envsubst \u003c kubernetes/$app.yaml | kubectl apply -f - \u0026\u0026 echo \"$image\" \u003e\u003e last.txt\n```\n\n(You need to delete the tag if it exists: `git tag -d v0.0.1  \u0026\u0026 git push --delete origin v0.0.1`)\n\n## Contribution\n\nAll contributions are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feon01%2Fdjango-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feon01%2Fdjango-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feon01%2Fdjango-boilerplate/lists"}