{"id":21455121,"url":"https://github.com/antvirf/railway_django_stack","last_synced_at":"2025-07-14T23:32:31.125Z","repository":{"id":213095178,"uuid":"732940717","full_name":"Antvirf/railway_django_stack","owner":"Antvirf","description":"A Railway template for a full Django app with a Celery worker, Redis and PostgreSQL","archived":false,"fork":false,"pushed_at":"2024-04-29T20:51:09.000Z","size":53,"stargazers_count":2,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-29T22:11:20.799Z","etag":null,"topics":["celery","django","postgresql","railway","railway-app","redis"],"latest_commit_sha":null,"homepage":"https://railway.app/template/NBR_V3?referralCode=6rOei9","language":"Python","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/Antvirf.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":"2023-12-18T07:56:37.000Z","updated_at":"2024-02-19T07:50:38.000Z","dependencies_parsed_at":"2023-12-30T11:30:52.540Z","dependency_job_id":"157bc999-d199-4a86-8285-e3eb6e017817","html_url":"https://github.com/Antvirf/railway_django_stack","commit_stats":null,"previous_names":["antvirf/railway_django_stack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antvirf%2Frailway_django_stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antvirf%2Frailway_django_stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antvirf%2Frailway_django_stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antvirf%2Frailway_django_stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Antvirf","download_url":"https://codeload.github.com/Antvirf/railway_django_stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226003010,"owners_count":17558157,"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":["celery","django","postgresql","railway","railway-app","redis"],"created_at":"2024-11-23T05:10:29.325Z","updated_at":"2024-11-23T05:10:29.855Z","avatar_url":"https://github.com/Antvirf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `railway_django_stack`\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/NBR_V3?referralCode=6rOei9)\n\nFull Django/Postgres stack with Celery tasks and Redis as cache/queue.\n\n## Overview\n\nDeploy a \"complete\" Django setup - DB, caching and background tasks with Celery are all set up and ready to go.\n\nCheck out the full readme and brief on GitHub: https://github.com/Antvirf/railway_django_stack\n\n## Deploying the template\n\n1. In the deployment screen, you will need to configure a `DJANGO_SECRET_KEY`. You can use the below snippet to do that or otherwise generate your own.\n    \u003cdetails\u003e\n    \u003csummary\u003eSnippet to create secret\u003c/summary\u003e\n\n    **This assumes your default python installation has Django installed.**\n\n    ```bash\n    python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'\n    ```\n\n    \u003c/details\u003e\n1. Once the containers have been deployed, please take the following steps to delete public proxy addresses, as you will not need to access the private services directly:\n    - Go to the **Postgres** service \u003e Settings \u003e Networking, delete the proxy\n    - Go to the **Redis** service \u003e Settings \u003e Networking, delete the proxy\n\n## Resources\n\nThis template deploys:\n\n- 1 service running Django\n- 1 service running Celery (same as container #1 but with different startup command)\n- 1 service running Redis\n- 1 service running Postgres\n\nYou can test the setup locally with docker compose:\n\n```bash\ngit clone https://github.com/Antvirf/railway_django_stack\ncd railway_django_stack\ndocker-compose up\n```\n\n## Service diagram\n\n\u003e **Warning**\n\u003e Please check the instructions above on deploying the template. By default, Railway creates publicly available proxies for your Postgres and Redis services - make sure to delete them. Should you ever need direct access, creating the proxies is just a few clicks.\n\n```mermaid\nflowchart LR\n\nsubgraph rwp[\"Your Railway Project\"]\n    subgraph public[\"Publicly exposed services\"]\n        django[\"App container\\n(Django server)\"]\n    end\n    subgraph private[\"Private services\"]\n        celery[\"App container\\n(Celery worker)\"]\n        psql[\"PostgreSQL\"]\n        redis[\"Redis\"]\n    end\nend\n\nusers[\"Users\"] --\u003e django\ndjango --\u003e celery\ndjango --\u003e psql\n\ncelery --\u003e psql\ncelery --\u003e redis\ndjango --\u003e redis\n\n```\n\n## Django project setup\n\nThis is a barebones Django-project with the following additions/updates:\n\n- Configures a PostgreSQL database\n- Configures a Redis cache\n- Configures Celery, and installs the following add-on apps:\n  - [`django-celery-beat`](https://github.com/celery/django-celery-beat) for periodic task management\n  - [`django-celery-results`](https://github.com/celery/django-celery-results) for viewing results of Celery tasks in Django Admin\n- Uses [`python-decouple`](https://github.com/HBNetwork/python-decouple) to manage settings via environment varialbes\n- Uses [`whitenoise`](https://github.com/evansd/whitenoise) to make serving static assets easy\n- Installs and runs with [`gunicorn`](https://github.com/benoitc/gunicorn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantvirf%2Frailway_django_stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantvirf%2Frailway_django_stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantvirf%2Frailway_django_stack/lists"}