{"id":13990551,"url":"https://github.com/0xadada/dockdj","last_synced_at":"2025-04-30T10:13:57.712Z","repository":{"id":139697986,"uuid":"43304186","full_name":"0xadada/dockdj","owner":"0xadada","description":":ship: A recipe for building 12-factor Python / Django web apps with multi-container Docker and deploying to Amazon AWS using Elastic Beanstalk.","archived":false,"fork":false,"pushed_at":"2018-01-26T16:21:28.000Z","size":604,"stargazers_count":59,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T10:13:53.106Z","etag":null,"topics":["amazon-aws","django","elasticbeanstalk","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/0xadada.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}},"created_at":"2015-09-28T13:58:50.000Z","updated_at":"2024-01-19T10:23:48.000Z","dependencies_parsed_at":"2024-01-18T04:51:44.389Z","dependency_job_id":"703facf6-0846-49ee-b9e9-e765d7c59379","html_url":"https://github.com/0xadada/dockdj","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xadada%2Fdockdj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xadada%2Fdockdj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xadada%2Fdockdj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xadada%2Fdockdj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xadada","download_url":"https://codeload.github.com/0xadada/dockdj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251683356,"owners_count":21626953,"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":["amazon-aws","django","elasticbeanstalk","python"],"created_at":"2024-08-09T13:02:54.752Z","updated_at":"2025-04-30T10:13:57.688Z","avatar_url":"https://github.com/0xadada.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# dockdj\n\n\u003e :ship: A recipe for building 12-factor Python / Django web apps with\nmulti-container Docker and deploying to Amazon AWS using Elastic Beanstalk.\n\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\nThe aim of Dockdj is to provide an example of how to quickly create a\nDjango web application following the [Twelve Factor](https://12factor.net/)\nApp principals.\n\n**The Twelve Factors**\n\n1. **Codebase**\u003cbr\u003e\n  One codebase tracked in revision control, many deploys\u003cbr\u003e\n  :white_check_mark: Yup, GitHub\n1. **Dependencies**\u003cbr\u003e\n  Explicitly declare and isolate dependencies\u003cbr\u003e\n  :white_check_mark: Yup, uses requirements.txt\n1. **Config**\u003cbr\u003e\n  Store config in the environment\u003cbr\u003e\n  :white_check_mark: Yup, uses .env files\n1. **Backing Services**\u003cbr\u003e\n  Treat backing services as attached resources\u003cbr\u003e\n  :white_check_mark: BYOBacking service\n1. **Build, release, run**\u003cbr\u003e\n  Strictly separate build and run stages\u003cbr\u003e\n  :white_check_mark: gulp, bin/image, bin/stevedore, bin/deploy\n1. **Processes**\u003cbr\u003e\n  Execute the app as one or more stateless processes\u003cbr\u003e\n  :white_check_mark: Thanks Docker!\n1. **Port binding**\u003cbr\u003e\n  Export services via port binding\u003cbr\u003e\n  :white_check_mark: 80 \u0026 8010\n1. **Concurrency**\u003cbr\u003e\n  Scale out via the process model\u003cbr\u003e\n  :white_check_mark: Keep your sessions in Redis or DB\n1. **Disposability**\u003cbr\u003e\n  Maximize robustness with fast startup and graceful shutdown\u003cbr\u003e\n  :white_check_mark: Thank Docker!\n1. **Dev/Prod parity**\u003cbr\u003e\n  Keep development, staging, and production as similar as possible\u003cbr\u003e\n  :white_check_mark: Yup\n1. **Logs**\u003cbr\u003e\n  Treat logs as event streams\u003cbr\u003e\n  :white_check_mark: Yup\n1. **Admin Processes**\u003cbr\u003e\n  Run admin/management tasks as one-off processes\u003cbr\u003e\n  :no_entry_sign: Does not Apply\n\n\n\n## Contents\n\nThis repo contains a simple Python Django 1.8 web app as well as the\nconfiguration for both Django and NGINX Docker images. There are\nalso some Bash scripts to help automate the build, release and\ndeploy process.\n\n**Stack**\n* Python 3.4\n* Django 1.8\n* Gunicorn app server\n* Nginx web server\n* Sass css preprocessor\n* Bootstrap 4-alpha CSS framework\n* Gulp build system\n\n\n## Get Started\n\nThis document assumes you are running OS X. These are the requirements\nneeded by the `bin/install` script;\n\n* Bash\n* XCode \u0026 command line utilities\n* [Homebrew](http://brew.sh) 0.9+\n\nAdditionally these requirements are installed:\n\n* [docker-machine](https://www.docker.com/docker-machine)\n* Docker \u0026 [Docker-compose](https://docs.docker.com/compose/)\n* Amazon Web Services [Elastic Beanstalk\nCLI](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html)\n\nThese steps will get you running locally:\n\n1. `./bin/install` will provision your local development machine for\n  the first time. It will\n  * install all requirements (if they don't exist)\n  * creates and starts a Docker virtual machine\n1. Copy `environments/dev/.env.example` to `environments/dev/.env` and\n  edit the values. Please make sure to change the following keys:\n  * `ENV_SECRET_KEY` create your own [Django secret\n    key](https://docs.djangoproject.com/en/dev/ref/settings/#secret-key)\n  * `ENV_CDN` to your Docker host IP: `docker-machine ip docker-vm`\n  * Optionally:\n    * `ENV_AWS_EB_ENVIRONMENT_NAME` to your Amazon AWS Elastic Beanstalk\n      environment name\n    * `ENV_DOCKER_HUB_REPO_PATH` to your Docker repo (Create one if you\n      plan to publish images to Docker Hub.)\n1. Create a dev python environment: `pyvenv environments/dev/pyvenv`\n1. `./bin/image dev build` will create \"dev\" Docker images with all\n   dependencies installed.\n1. `./bin/stevedore dev start` will run the dev Docker containers, open\n   the browser, and tail the logs. At this point you're viewing running\n   source code!\n  * `ctrl+c` stops the logs `./bin/stevedore dev stop` will stop the Docker\n    containers.\n  * `./bin/stevedore dev logs` resumes log tailing.\n1. Optionally, to build frontend assets (CSS, images, etc):\n  * Run `./bin/stevedore dev build:dev`\n\nYou can typically connect to your web application at:\nhttp://192.168.99.100/xyzzy.\n\nYou should now be up and running. Welcome.\n\n\n## Deployment\n\nRead more about deploying with Amazon AWS Elastic Beanstalk, version\nnumbering, running deployments, hotfix / patch deployments, Docker Hub,\nand more on the [Deployments](../../wiki/Deployments) wiki page.\n\n\n## Testing \u0026 Code Quality Tooling\n\nRead more about the set of [tools](../../wiki/Tooling) for managing,\ntesting and deploying.\n\n\n## Authors\n\n* [0xADADA](https://github.com/0xadada) -\n  [@0xadada](http://twitter.com/0xadada)\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xadada%2Fdockdj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xadada%2Fdockdj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xadada%2Fdockdj/lists"}