{"id":20172435,"url":"https://github.com/sanoguzhan/django-helm-chart","last_synced_at":"2025-04-10T02:52:30.473Z","repository":{"id":39297842,"uuid":"453768064","full_name":"sanoguzhan/django-helm-chart","owner":"sanoguzhan","description":"Django Helm Chart with Celery, Celery-Beat, Flower and Redis","archived":false,"fork":false,"pushed_at":"2024-03-26T21:26:14.000Z","size":52,"stargazers_count":24,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T04:22:30.066Z","etag":null,"topics":["caddy","celery","celery-monitor","celery-redis","celery-workers","celerybeat","chart","django","flower","helm","kubernetes","redis"],"latest_commit_sha":null,"homepage":"","language":"Smarty","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/sanoguzhan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-30T18:38:52.000Z","updated_at":"2025-01-24T10:22:13.000Z","dependencies_parsed_at":"2024-03-26T22:31:25.225Z","dependency_job_id":"909299e2-05ed-4d65-b183-b96ada7535c8","html_url":"https://github.com/sanoguzhan/django-helm-chart","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanoguzhan%2Fdjango-helm-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanoguzhan%2Fdjango-helm-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanoguzhan%2Fdjango-helm-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanoguzhan%2Fdjango-helm-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanoguzhan","download_url":"https://codeload.github.com/sanoguzhan/django-helm-chart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147123,"owners_count":21055480,"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":["caddy","celery","celery-monitor","celery-redis","celery-workers","celerybeat","chart","django","flower","helm","kubernetes","redis"],"created_at":"2024-11-14T01:30:36.164Z","updated_at":"2025-04-10T02:52:30.449Z","avatar_url":"https://github.com/sanoguzhan.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Helm Chart \n\n\nDjango Helm Chart with [Celery](https://github.com/celery/celery), [Celery-Beat](https://docs.celeryq.dev/en/stable/reference/celery.beat.html), [Flower](https://flower.readthedocs.io/en/latest/) and [Redis]((https://redis.io)).\nThe chart also includes deployments for Celery setup (Worker, Flower.\n\n- Deployment includes a multi container pod with Django and Caddy. [Caddy](https://caddyserver.com) is used as sidecar to serve the static files of backend. Caddyfile can be found [here](https://github.com/sanoguzhan/django-helm-chart/blob/master/django/templates/caddy.yaml).\n\n- The chart includes [Redis](https://redis.io) as an optional subchart.\n\n- The Deployment containers init containers for migrations and staticfiles.\n\n\nThis is my personal take on such a type of chart, thus I might not use the best practices or you might disagree with how I do things. Any and all feedback is greatly appreciated!\n\n## Deployment setup\n\nSet values for Django backend on Deployment Section of values.yaml\n\n**Example:**\n\n```yaml\nreplicaCount: 1\nrevisionHistoryLimit: 2\nimage:\n  repository: ghcr.io/sanoguzhan/django-helm-test\n  pullPolicy: IfNotPresent\n  # Overrides the image tag whose default is the chart appVersion.\n  tag: \"latest\"\n  containerPort: 8081\ncommand: 'gunicorn blog.wsgi -b 0.0.0.0:8081'\n```\n\n_Note:_ Set the command as a string instead of a list.\n## Static Files\n\nStatic files collect is done by initContainers.\n- **staticfiles:** Add command for Django to collect static files.\n\n```yaml\ncollect_static:\n  enabled: false\n  name: staticfiles\n  command: \"python3 manage.py collectstatic --noinput\"\n```\n\nStatic files and Media directories should be given under data:\n\n```yaml\ndata:\n  staticfiles: \"app/staticfiles/\"\n  data_media: \"app/data_media/\"\n```\n\nPaths should be relative to the working directory of main container.\nStatic files are shared volume (emptyDir) between initContainer and Proxy container.\n\n\n## Migrations\n\nMigrations are done with a Job. ServiceAccount, configMap and secret values are loaded before application container starts. Job is deleted after completion.\n\n```yaml\ndb_migrations:\n  enabled: true\n  name: db-migration\n  command: \"python3 manage.py migrate --noinput\"\n  resources: {}\n  safeToEvict: true\n\n```\n\n## ConfigMaps and Secrets\n\nConfigMaps and Secret values should be set under:\n\n```yaml\n# Env ConfigMap values \nenvConfigs: {}\n# Enc Secret Values (Base64 encoded data)\nenvSecrets: {}\n\n```\n\n\n## Celery Setup \n\nCelery setup includes worker, flower and beat. Celery Beat is optional, set enabled to false if you want to exclude it. Flower includes ingress setup optionally. \n\n```yaml\ncelery:\n# Celery Beat Values\n  beat:\n    enabled: true\n    componentName: celery-beat\n    command: 'celery -A blog.celery beat -l DEBUG'\n    replicaCount: 1\n    strategy: Recreate\n# Celery Worker Settings  \n  worker:\n    componentName: celery-worker\n    command: 'celery -A blog.celery worker -l DEBUG'\n    replicaCount: 1\n    strategy: RollingUpdate\n# Celery Flower Settings\n  flower:\n    componentName: celery-flower\n    command: 'celery -A blog.celery flower'\n    replicaCount: 1\n    strategy: RollingUpdate   \n    service:\n      type: ClusterIP\n      port: \n        number: 5555\n        name: flower\n    ingress:\n      enabled: false\n      annotations: {}\n      hosts:\n        - host: example.com\n          paths:\n            - path: / \n              pathType: Prefix\n      tls: []  \n```\n\n## Redis \n\nRedis is optional sub-chart, which could be disabled by setting enabled to false. \n[Bitnami Redis Helm Chart](https://github.com/bitnami/charts/tree/master/bitnami/redis) is used, and version of the chart is given in the Chart.yaml file.\n\n\n```yaml\nredis:\n  enabled: true\n```\n\nBuild chart dependency includes\n\n```sh \nhelm dependency build ./django\n```\n\n## Getting Started\n\n### Use the Github template\n\nFirst, click the green `Use this template` button near the top of this page.\nThis will take you to Github's ['Generate Repository'](https://github.com/sanoguzhan/django-helm-chart/generate) page.\nFill in a repository name and short description, and click 'Create repository from template'.\nThis will allow you to create a new repository in your Github account,\nprepopulated with the contents of this project.\n\nNow you can clone the project locally and get to work!\n\n    git clone https://github.com/\u003cuser\u003e/\u003cyour_new_repo\u003e.git","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanoguzhan%2Fdjango-helm-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanoguzhan%2Fdjango-helm-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanoguzhan%2Fdjango-helm-chart/lists"}