-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from reef-technologies/sembr
fix `readable` integration
- Loading branch information
Showing
4 changed files
with
68 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
cookiecutter-rt-django | ||
====================== | ||
# cookiecutter-rt-django | ||
|
||
CookieCutter template for Django application projects with docker-compose etc. | ||
|
||
Requirements | ||
------------ | ||
## Requirements | ||
|
||
```sh | ||
pip install cruft | ||
``` | ||
|
||
Usage | ||
----- | ||
## Usage | ||
|
||
* Generate a new Cookiecutter template layout: | ||
- Generate a new Cookiecutter template layout: | ||
```sh | ||
cruft create https://github.com/reef-technologies/cookiecutter-rt-django | ||
``` | ||
* See diff with | ||
- See diff with | ||
```sh | ||
cruft diff | ||
``` | ||
* Update the project by running | ||
- Update the project by running | ||
```sh | ||
cruft update | ||
``` | ||
* If you have a repo which was initialized without cruft (i.e. with `cookiecutter` command), you can still link the project: | ||
- If you have a repo which was initialized without cruft (i.e. with `cookiecutter` command), you can still link the project: | ||
```sh | ||
cruft link https://github.com/reef-technologies/cookiecutter-rt-django | ||
``` | ||
|
||
More on cruft: https://github.com/cruft/cruft | ||
More on cruft: | ||
<https://github.com/cruft/cruft> | ||
|
||
## License | ||
|
||
License | ||
------- | ||
This project is licensed under the terms of the [BSD-3 License](/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,65 @@ | ||
# RT cookiecutter template selling points | ||
|
||
## Main configuration | ||
* [Cookiecutter](https://github.com/cookiecutter/cookiecutter) template | ||
* Template updates using [Cruft](https://github.com/cruft/cruft) | ||
* [Docker](https://www.docker.com) and [docker-compose](https://docs.docker.com/compose/) for easy & simple (c) development and deployment | ||
* Latest [python](https://www.python.org) from 3.9 line (due to [nogil fork compatibility](https://www.backblaze.com/blog/python-gil-vs-nogil-boost-i-o-performance-10x-with-one-line-change/)) | ||
* Latest [Django](https://www.djangoproject.com) LTS release | ||
* [Gunicorn](https://gunicorn.org) for running WSGI instances on prod | ||
* [Uvicorn](https://www.uvicorn.org) for ASGI instances on prod | ||
* [Postgres](https://www.postgresql.org) for database | ||
* Task management via [celery](https://docs.celeryproject.org) | ||
* Multiple workers & queues supported (if you need to divide / prioritize tasks and apply different levels of concurrency) | ||
|
||
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) template | ||
- Template updates using [Cruft](https://github.com/cruft/cruft) | ||
- [Docker](https://www.docker.com) and [docker-compose](https://docs.docker.com/compose/) for easy & simple (c) development and deployment | ||
- Latest [python](https://www.python.org) from 3.9 line (due to [nogil fork compatibility](https://www.backblaze.com/blog/python-gil-vs-nogil-boost-i-o-performance-10x-with-one-line-change/)) | ||
- Latest [Django](https://www.djangoproject.com) LTS release | ||
- [Gunicorn](https://gunicorn.org) for running WSGI instances on prod | ||
- [Uvicorn](https://www.uvicorn.org) for ASGI instances on prod | ||
- [Postgres](https://www.postgresql.org) for database | ||
- Task management via [celery](https://docs.celeryproject.org) | ||
- Multiple workers & queues supported (if you need to divide / prioritize tasks and apply different levels of concurrency) | ||
|
||
## Self-hosted configuration | ||
* Persistent [redis](https://redis.io) for task management backend | ||
* Celery task monitoring via [flower](https://flower.readthedocs.io/en/latest/) | ||
|
||
- Persistent [redis](https://redis.io) for task management backend | ||
- Celery task monitoring via [flower](https://flower.readthedocs.io/en/latest/) | ||
|
||
## Cloud configuration | ||
* AWS terraform to deploy RDS, SQS, ELB etc | ||
|
||
- AWS terraform to deploy RDS, SQS, ELB etc | ||
|
||
## Configuration | ||
* [.env files](https://12factor.net/config) for configuration; preconfigured `.env` for both local and prod environments | ||
* [django-debug-toolbar](https://django-debug-toolbar.readthedocs.io/en/latest/) (enabled for local environment) for debugging app performance | ||
* [ipython](https://ipython.org) included for nice interactive django shell | ||
* [django-extensions](https://django-extensions.readthedocs.io/en/latest/) for drawing graph of models and more | ||
|
||
- [.env files](https://12factor.net/config) for configuration; preconfigured `.env` for both local and prod environments | ||
- [django-debug-toolbar](https://django-debug-toolbar.readthedocs.io/en/latest/) (enabled for local environment) for debugging app performance | ||
- [ipython](https://ipython.org) included for nice interactive django shell | ||
- [django-extensions](https://django-extensions.readthedocs.io/en/latest/) for drawing graph of models and more | ||
|
||
## Deployment | ||
* [2-stage docker image build](https://docs.docker.com/develop/develop-images/multistage-build/) for clean app image | ||
* Easy deployment based on `git push production master` | ||
* Redeployment doesn't stop `db`, `redis` and `nginx` containers -> non-interrupted deployments | ||
* Migrations are done during deployment, before application startup -> application won't be run on unmigrated database | ||
|
||
- [2-stage docker image build](https://docs.docker.com/develop/develop-images/multistage-build/) for clean app image | ||
- Easy deployment based on `git push production master` | ||
- Redeployment doesn't stop `db`, `redis` and `nginx` containers -> non-interrupted deployments | ||
- Migrations are done during deployment, before application startup -> application won't be run on unmigrated database | ||
|
||
## Security | ||
* [CORS headers](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) preconfigured | ||
* [CSP](https://en.wikipedia.org/wiki/Content_Security_Policy) integrated | ||
* Compression is off by default to avoid [BREACH attack](https://en.wikipedia.org/wiki/BREACH) | ||
* Brotli compression support | ||
* [http/2](https://en.wikipedia.org/wiki/HTTP/2) support | ||
* [TLS 1.2&1.3](https://en.wikipedia.org/wiki/Transport_Layer_Security) via [letsencrypt](https://letsencrypt.org) with auto-renewal | ||
* Forward secrecy ciphers | ||
* Overall ssllabs security class: A+ 100/100/90/90 (to keep compatibility with some older clients) | ||
|
||
- [CORS headers](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) preconfigured | ||
- [CSP](https://en.wikipedia.org/wiki/Content_Security_Policy) integrated | ||
- Compression is off by default to avoid [BREACH attack](https://en.wikipedia.org/wiki/BREACH) | ||
- Brotli compression support | ||
- [http/2](https://en.wikipedia.org/wiki/HTTP/2) support | ||
- [TLS 1.2&1.3](https://en.wikipedia.org/wiki/Transport_Layer_Security) via [letsencrypt](https://letsencrypt.org) with auto-renewal | ||
- Forward secrecy ciphers | ||
- Overall ssllabs security class: | ||
A+ 100/100/90/90 (to keep compatibility with some older clients) | ||
|
||
## Reliability | ||
* Backups to: | ||
* Host system | ||
* [B2](https://www.backblaze.com/b2/cloud-storage.html) using a `writeFiles`-only key | ||
* Script and a written procedure for restoring the system from a backup | ||
* [Sentry](https://sentry.io) error tracking preconfigured | ||
* Prometheus for data collection | ||
* Grafana for metrics | ||
* Generic host dashboard section optimized for both VM and physical machines | ||
* nginx-level dashboard section for http/ws statistics | ||
* Active monitoring dashboard (http ping) | ||
* Alert history dashboard | ||
* Alertmanager for detecting issues and alerting | ||
|
||
- Backups to: | ||
- Host system | ||
- [B2](https://www.backblaze.com/b2/cloud-storage.html) using a `writeFiles`-only key | ||
- Script and a written procedure for restoring the system from a backup | ||
- [Sentry](https://sentry.io) error tracking preconfigured | ||
- Prometheus for data collection | ||
- Grafana for metrics | ||
- Generic host dashboard section optimized for both VM and physical machines | ||
- nginx-level dashboard section for http/ws statistics | ||
- Active monitoring dashboard (http ping) | ||
- Alert history dashboard | ||
- Alertmanager for detecting issues and alerting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters