{"id":21855616,"url":"https://github.com/zeropsio/recipe-django","last_synced_at":"2026-03-17T20:02:15.966Z","repository":{"id":243248119,"uuid":"811902024","full_name":"zeropsio/recipe-django","owner":"zeropsio","description":"Zerops w/ Django","archived":false,"fork":false,"pushed_at":"2025-04-03T08:01:04.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T18:12:12.790Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeropsio.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":"2024-06-07T14:26:49.000Z","updated_at":"2025-04-03T08:01:08.000Z","dependencies_parsed_at":"2024-07-19T17:11:56.700Z","dependency_job_id":"15352a80-da32-45bc-85e0-ddbcd99a4da2","html_url":"https://github.com/zeropsio/recipe-django","commit_stats":null,"previous_names":["zeropsio/recipe-django"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeropsio","download_url":"https://codeload.github.com/zeropsio/recipe-django/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933340,"owners_count":21185460,"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":"2024-11-28T02:16:41.592Z","updated_at":"2026-03-17T20:02:10.945Z","avatar_url":"https://github.com/zeropsio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zerops x Django\n\n[Django](https://www.djangoproject.com/) is a high-level Python web framework that encourages rapid development and clean, pragmatic design. This recipe aims to showcase few advanced Django concepts and how to integrate them with [Zerops](https://zerops.io), all through a simple file upload demo application.\n\n![django](https://github.com/zeropsio/recipe-shared-assets/blob/main/covers/svg/cover-django.svg)\n\n\u003cbr /\u003e\n\n## Deploy on Zerops\nYou can either click the deploy button to deploy directly on Zerops, or manually copy the [import yaml](https://github.com/zeropsio/recipe-django/blob/main/zerops-project-import.yml) to the import dialog in the Zerops app.\n\n[![Deploy on Zerops](https://github.com/zeropsio/recipe-shared-assets/blob/main/deploy-button/green/deploy-button.svg)](https://app.zerops.io/recipe/django)\n\n\u003cbr/\u003e\n\n## Recipe features\n\n- **Load balanced** Django web app running on **Zerops Python** service\n- Served by production-ready application server **[Gunicorn](https://gunicorn.org/)**\n- Zerops **PostgreSQL 16** service as database\n- Zerops **Object Storage** (S3 compatible) service as file system\n- Automatic Django **database migrations**, **static files collection** and **superuser seeding**\n- Utilization of Zerops built-in **environment variables** system\n- Logs accessible through Zerops GUI\n- **[Mailpit](https://github.com/axllent/mailpit)** as **SMTP mock server**\n- **[Adminer](https://www.adminer.org)** for **quick database management** tool\n- Unlocked development experience:\n  - Access to database and mail mock through Zerops project VPN (`zcli vpn up`)\n  - Prepared `.env.dist` file (`cp .env.dist .env` and change ***** secrets found in Zerops GUI)\n\n\u003cbr/\u003e\n\n## Production vs. development\n\nBase of the recipe is ready for production, the difference comes down to:\n\n- Use highly available version of the PostgreSQL database (change `mode` from `NON_HA` to `HA` in recipe YAML, `db` service section)\n- Use at least two containers for Django service to achieve high reliability and resilience (add `minContainers: 2` in recipe YAML, `app` service section)\n- Use production-ready third-party SMTP server instead of Mailpit (change `MAIL_` secret variables in recipe YAML `app` service)\n- Since the Django app will run behind our HTTP balancer proxy, add your domain/subdomains to `recipe/settings.py` `CSRF_TRUSTED_ORIGINS` setting or add `APP_DOMAIN` secret variable (in recipe YAML, `app` service section)\n- Disable public access to Adminer or remove it altogether (remove service `adminer` from recipe YAML)\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Changes made over the default installation\n\nIf you want to modify your existing Django app to efficiently run on Zerops, these are the general steps we took:\n\n- Add [zerops.yml](https://github.com/zeropsio/recipe-django/blob/main/zerops.yml) to your repository, our example includes idempotent migrations, static files collection and optimized build process\n- Run `pip install django-storages` and change storage settings section in your `project/settings.py` to support S3 compatible Object Storage file system (more info [here](https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html))\n- Utilize Zerops [environment variables](https://github.com/zeropsio/recipe-django/blob/main/zerops.yml#L18-L32) and [secrets](https://github.com/zeropsio/recipe-django/blob/main/zerops-project-import.yml#L12-L15) to set up S3 for file system, database access, mailer and trusted hosts to work with reverse proxy load balancer\n- Add init commands for your deployments to [migrate database and collect static images](https://github.com/zeropsio/recipe-django/blob/main/zerops.yml#L34-L39)\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nNeed help setting your project up? Join [Zerops Discord community](https://discord.com/invite/WDvCZ54).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeropsio%2Frecipe-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-django/lists"}