Commit Graph

88 Commits

Author SHA1 Message Date
Andrew Chen Wang
2ecbf7ac34
Merge branch 'master' into async 2020-04-06 23:02:36 -04:00
Andrew-Chen-Wang
aee2de347b Add uvicorn and web sockets for Django 3
* Add use_async option to cookiecutter.json
* Add websocket configuration
2020-03-24 15:40:14 -04:00
Bruno Alla
c4b1666707 Move storages classes into their own module 2020-03-23 21:46:14 +00:00
Andrew-Chen-Wang
484fa4ae77 Added unsupported mail_service combinations
* Added default yaml Loader for pre_gen_projects.py
2020-03-22 13:31:52 -04:00
Bruno Alla
949d8b684c Merge branch 'master' into drf-option-with-tests
# Conflicts:
#	hooks/post_gen_project.py
2020-01-23 14:41:42 +00:00
Ivan Khomutov
113ce88d9c Add option to choose CI tool 2019-12-06 10:55:00 +03:00
Jelmert
eb8ea447e4 fix: black 2019-10-21 11:12:53 +02:00
Jelmert
58f41fc97f fix: remove the aws Dockerfile and remove the awscli definition from production.yml when not selected 2019-10-21 10:07:17 +02:00
Bruno Alla
6a9feea2fe
Support python 3.7 (#2240)
Support python 3.7
2019-10-06 11:06:03 +01:00
Caio Ariede
d0c208d10f Fix #2249 -- Broken static files with whitenoise=n & cloud_provider=none 2019-10-02 12:03:33 -03:00
Nicolas Stefani
ea52a0be25 Updated python version in warning message 2019-09-29 21:46:34 -03:00
Jerome Caisip
548417612f Additonal option to setup DRF. 2019-09-17 23:24:09 +08:00
Bruno Alla
2103cf2f9d Add a pre-generation hook to avoid non-lowercase slugs - fixes #2042 2019-06-05 19:00:43 +01:00
Tano Abeleyra
de7be3652a Make cloud_provider optional
Some projects may not need AWS or GCS
2019-05-19 12:45:28 -03:00
Bruno Alla
895298c28f Refactor Celery integration according to current best practices
- Change celery app to not be a Django app, more like a WSGI app
- Define a Celery task in the Django users app
- Write a test to execute the task
- Update scripts to use the new app to start workers
- Update documentation

Fix #865
2019-04-02 15:40:32 +01:00
Bruno Alla
becd2dce13 Reword & clarify Python 2 warning in pre gen hook
Fixes #1942
2019-03-27 21:27:52 +00:00
Bruno Alla
b91c70d755
Add a node image to run Gulp when selecting it with Docker (#1687)
## Description

Following up on @webyneter attempt in #1205, which is now getting outdated, I've tried to make Gulp task runner work with Docker. There is no documentation yet, but this seems to work locally with the custom bootstrap compilation...

- [x] Add a node image for local developement
- [x] Proxy the django image rather than localhost in Browser sync, pass header to keep hostname
- [x] Don't call the runserver command from Gulp, let docker-compose handle
- [x] Update package.json & gulpfile.js templates to reduce the number of unwanted empty lines
- [x] Use [multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/) in production to make sure the static assets are produced
- [x] Update documentation
- [x] Verify that the previous issue with static assets missing from production isn't there 

## Rationale

Currently, the static build isn't working nicely with Docker, extra manual setup is required.

Fixes #1762
2019-03-25 12:10:55 +00:00
Bruno Alla
68f7268770
Run Black on Travis (#1957)
* Create a test matrix on Travis CI to help testing multiple options

* Change test_docker.sh to fail if any command in it fails

* Run black on the CI with --check option

* Fix formatting of project files using black

* Install black in the docker container

* Exclude migrations in black checks

* Fix Black formatting violations

* Run black on the whole generated project & fix issues
2019-03-18 17:49:43 +00:00
Cole Mackenzie
5a4a3217f1 prevent removal if using travisci 2018-10-16 13:22:04 -06:00
Cole Mackenzie
9e8e09119d
Remove requirements.txt file from delete list.
fixes #1829
2018-10-10 21:35:17 -06:00
Bruno Alla
11bb4cdb84 Avoid '$' in random string generation
Until the [upstream bug](https://github.com/joke2k/django-environ/issues/60) is fixed in django-environ, this should prevent people using this template from hitting the bug.

Fix #454
2018-09-18 10:27:58 +01:00
Nikita P. Shupeyko
ed7609f715 Remove utility/ when use_docker=y 2018-06-28 16:43:34 +03:00
Nikita P. Shupeyko
c5c6bace99 Remove LICENSE for non open source projects 2018-06-28 16:39:51 +03:00
Nikita Shupeyko
275c13292c
Integrate Flower with Docker Compose setup (#1655)
* Integrate Flower with Docker Compose setup locally

* Remove alien worker celeryd option

* Move Flower COPY section below the worker's

* Remove set -o pipefail command from Flower start script

* Flower client authentication

* Override flower service image name

* Move flower service to the end of local.yml

* Install flower==0.9.2 in all environments

* Introduce production flower service

* Fix local flower start script

* Document Flower integration

* Prettify *.django envs

Rationale: consistency.

* Reference local environment Flower docs from the production's

* 'two more services' -> 'three more services'
2018-06-27 19:33:21 +03:00
saschalalala
6d4be405d8 Migrate to Django2 path urls (#1637)
* Change users urls to Django 2 paths

* Change config urls to Django 2 paths

* Change admin url setting to Django 2 path syntax

* Replace more admin urls

* Add myself to contributors.rst
2018-05-14 10:09:24 +03:00
Nikita P. Shupeyko
be1024cd06 Drop Grunt support
Closes #1636.
2018-05-13 13:51:01 +03:00
Nikita P. Shupeyko
1732659678 Set POSTGRES_USER and POSTGRES_PASSWORD to the debug value when opting for debug 2018-05-05 13:47:58 +03:00
Nikita P. Shupeyko
d8267edd09 Run black reformatting
https://github.com/ambv/black
2018-05-05 12:37:10 +03:00
Daniel Roy Greenfeld
3f753e0411
First pass at running black across the project (#1602) 2018-04-08 17:03:29 -05:00
Nikita P. Shupeyko
34673ff686 Merge .celery envs file with .django
Rationale: workflow simplification.
2018-04-04 10:52:16 +03:00
Nikita Shupeyko
59cd5b4849
Celery code blocks are still generated even though Celery is not opted out for (#1587)
* Celery jinja condition in .gitignore

* Celery jinja conditions in Django Dockerfiles

* Re-phrase Django Dockerfile requirements comments

* Remove celery compose dirs through post_gen_project.py
2018-03-27 18:40:44 +03:00
Nikita P. Shupeyko
57761e77b3 Fix .envs in template's .gitignore
Fix #1565.
2018-03-09 17:36:11 +03:00
Nikita P. Shupeyko
03ee6c78d6 Fix CELERY_BROKER_URL overriden in entrypoint.sh
Closes #1235.
2018-03-08 19:04:10 +03:00
Nikita Shupeyko
3f8aa26d0f
Group environment variables by the corresponding directories (#1295)
* Update generated project's .gitignore

* Post-gen gitignore .env/ and .env

* Fix linesep between gitignored entries

* Persist `.env/**/*` files into cookiecutter-django's VCS

* Rename .env/ to .envs/

* Reference the newly created .envs/**/.* files in local.yml

* Reference the newly created .envs/**/.* files in production.yml

* Delete .env.example

* Refactor post-gen-project.py

Closes #1299.

* Implement production-dotenv-files-to-dotenv-file merge script

* Create shared PyCharm Run Configuration for the automation script

* Randomize POSTGRES_PASSWORD in ./envs/(.local|.production)/.postgres

* Default POSTGRES_PASSWORD and POSTGRES_USER to random values

* Fix jinja linebreaks in local.yml

* Spaces in production.yml

* Fix post-merge leftovers & set DJANGO_ADMIN_URL automatically

* Prettify here and there

* Fix FileNotFoundError

* Leave a TODO in post_gen_hook.py

* Introduce keep_local_envs_in_vcs option

* Remove envs when not opted for

* Inline pre_gen_project.py if-condition

* Get rid of PROJECT_DIR_PATH in post_gen_project.py

* Clean up the docs

* Match copyright notices

* Document envs ins and outs
2018-03-08 15:56:15 +03:00
Nikita P. Shupeyko
0a69f19452 Opt for .travis.yml
Closes #1542.
2018-03-04 15:11:54 +03:00
Nikita P. Shupeyko
afd3191038 Get rid of remove_file() from post hook 2018-03-04 15:07:49 +03:00
Nikita P. Shupeyko
438ec0c101 Remove .env when neither Docker nor Heroku are opted out for 2018-03-04 14:44:37 +03:00
Nikita P. Shupeyko
281dde1d1d Simplify post hook 2018-03-04 14:43:54 +03:00
Nikita P. Shupeyko
69ff5515c9 Fix GPLv3 files not being removed 2018-03-01 22:43:19 +03:00
Daniel Roy Greenfeld
f4cadeec97 Disallow backslashes in author name 2018-02-21 18:54:03 -05:00
Nikita Shupeyko
86e33e8714
Refactor *_gen_project hooks (#1490)
* Fix ./hooks/pre_gen_project.py asking user to select an option once only

+ prettify output

* Fix pre_gen hook not really exiting when it should

* Refactor & prettify ./hooks/post_gen_project.py

* Ensure same POSTGRES_USER is set across environments

+ get rid of env.example in favor of pre-generated .env.
2018-02-07 22:52:52 +03:00
Bruno Alla
090c81731b
Merge pull request #1418 from reggieriser/django_python_upgrade_cleanups
Fixing leftovers from migration to Django 1.11 and Python 3.6.
2018-02-07 14:52:27 +00:00
Reggie Riser
cc888d89a8 Fixed old docker-compose filenames (#1457) 2018-01-17 10:13:09 -08:00
Daniel Roy Greenfeld
e69ceebfc5 Possible fix for 2018-01-16 22:06:28 -08:00
Audrey Roy Greenfeld
1cb9605511 Remove old lets_encrypt stuff that was breaking tests 2018-01-15 14:05:27 -08:00
Daniel Roy Greenfeld
793a46ba45 Removed expiramental elastic beanstalk support and bumped official Django version to 1.11.9 2018-01-15 12:33:51 -08:00
Reggie Riser
f7bd7a5814 Fixing leftovers from migration to Django 1.11 and Python 3.6. 2018-01-03 08:44:54 -05:00
Jannis Gebauer
8801c50867 switch to caddy (#1282) 2017-08-11 11:16:15 +02:00
Shupeyko Nikita
e889316b11 Rename dev.yml to local.yml (#1227)
* Rename dev.yml to local.yml

Closes #1226.

* Rename docker-compose.yml to production.yml
2017-07-14 17:09:41 +03:00
Shupeyko Nikita
1f7be4eb57 Revert "Node.JS + docker-compose = ♥" (#1206)
* Revert "[Fix] #1173 Nginx SSL redirect loop (#1174)"

This reverts commit cabcc7b106.

* Revert "Fix Getting Up and Running Locally With Docker doc sphinx warnings (#1165)"

This reverts commit 83c8594203.

* Revert "Fix index.rst sphinx warnings (#1166)"

This reverts commit 51dd0b5e73.

* Revert "Pin mailhog Docker image to v1.0.0 (#1201)"

This reverts commit d9f870461b.

* Revert "Node.JS + docker-compose = ♥ (#1128)"

This reverts commit 4b06fe3958.
2017-06-21 23:12:22 +03:00