- 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
## 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
* 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
* 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'
* 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
* 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.
* Introduce static asset build infrastructure
* Enhance gulpfile.js
* Introduce node service
* BrowserSync debug-only support
* Remove newline before BrowserSync debug-only support section
* FIx node Dockerfile package.json COPY
* Try fiixing node Dockerfile package.json COPY ones again
* Switch to `node:7-slim`
* Try switching to node:6
To account for possible node:7 docker-compose incompatibiltiy
* Revert "Try switching to node:6"
This reverts commit 62cc02df1a.
* Try switcging workdir to /app
* Try utilizing relative package.json path
* Resetting to the last version working locally with docker-compose 1.11.x
* Build upon the latest node:7.9-slim
* Stop dockerignoring package.json
* Fix typo
* Try a different package.json path
* Revert "Try a different package.json path"
This reverts commit f29f8500b8.
* Revert "Fix typo"
This reverts commit 02033729b5.
* Revert "Stop dockerignoring package.json"
This reverts commit 63c5491546.
* Upgrade docker-engine and docker-compose used by Travis CI
* Fix .travis.yml comments
* Inline docker-engine and docker-compose versions
* DEBUG: pwd
* Revert "DEBUG: pwd "
This reverts commit 6c2ed4321a.
* Try copying package.json to the same dir as node Dockerfile's
* Revert "Try copying package.json to the same dir as node Dockerfile's"
This reverts commit 24340a0783.
* Try out node:7.9
* Revert "Try out node:7.9"
This reverts commit 32286d33c2.
* Revert "Upgrade docker-engine and docker-compose used by Travis CI"
* Get rid of npm-check-updates
Reason: Reserved for the upcoming PR
* Get rid of npm-check
Reason: Reserved for the upcoming PR
* Get rid of 'standard' npm package
Reason: Reserved for the upcoming PR
* Clean up package.json
* Preserve package.json uncoditionally
Since we now have *unconditional* node.js integration, `package.json` must be out there whenever `node` service gets built
* Upgrade node service image to 7.10
* Document Node.js-Docker integration
* Fix gulpfile.js images region name
* Get rid of Gulp migrate task
* Document Gulp-Docker integration
* Introduce static asset build infrastructure
* Enhance gulpfile.js
* Introduce node service
* BrowserSync debug-only support
* Remove newline before BrowserSync debug-only support section
* FIx node Dockerfile package.json COPY
* Try fiixing node Dockerfile package.json COPY ones again
* Switch to `node:7-slim`
* Try switching to node:6
To account for possible node:7 docker-compose incompatibiltiy
* Revert "Try switching to node:6"
This reverts commit 62cc02df1a.
* Try switcging workdir to /app
* Try utilizing relative package.json path
* Resetting to the last version working locally with docker-compose 1.11.x
* Build upon the latest node:7.9-slim
* Stop dockerignoring package.json
* Revert "Stop dockerignoring package.json"
This reverts commit 63c5491546.
* Fix typo
* Revert "Fix typo"
This reverts commit 02033729b5.
* Try a different package.json path
* Revert "Try a different package.json path"
This reverts commit f29f8500b8.
* Upgrade docker-engine and docker-compose used by Travis CI
* Fix .travis.yml comments
* Inline docker-engine and docker-compose versions
* DEBUG: pwd
* Revert "DEBUG: pwd "
This reverts commit 6c2ed4321a.
* Try copying package.json to the same dir as node Dockerfile's
* Revert "Try copying package.json to the same dir as node Dockerfile's"
This reverts commit 24340a0783.
* Try out node:7.9
* Revert "Try out node:7.9"
This reverts commit 32286d33c2.
* Revert "Upgrade docker-engine and docker-compose used by Travis CI"
* Get rid of npm-check-updates
Reason: Reserved for the upcoming PR
* Get rid of npm-check
Reason: Reserved for the upcoming PR
* Get rid of 'standard' npm package
Reason: Reserved for the upcoming PR
* Clean up package.json
* Preserve package.json uncoditionally
Since we now have *unconditional* node.js integration, `package.json` must be out there whenever `node` service gets built
* Upgrade node service image to 7.10
* Document Node.js-Docker integration
* Fix gulpfile.js images region name
* Get rid of Gulp migrate task
* Document Gulp-Docker integration
* Remove Gulp-Docker integraton not supported initialization message
* An small pythonic approach to password
Providing a more pythonic line for password generation using for that the string content, as suggested for the documentation in #949.
* Adding missing line
Adding missing import at the head of the file. The previous commit added the string content, but I didn't added the needed import line. This fixes it.
Includes:
* First pass at Elastic Beanstalk integration
* Gets code and elasticache working
* Very rudimentary documentation
* Includes post hook cleanup
* Remove webpack and merge
* Put postgresql_version line back in cookiecutter.json
* Put goldhand back in contributors file, added ssteinerX
* Add *.egginfo to .gitignore
* Fix dangling endif in README.rst
* Add webpack as an option
Adds webpack as a js_taskrunner option to cookiecutter-json. Will clone @hzdg/cookiecutter-webpack --pydanny-django branch into the project using cookiecutter's api in post_hooks.
The static webpack project will be placed into the <project_slug>/static/<project_slug>/ directory.
The webpack configs are placed in the ./config/ directory.
The cookiecutter-webpack project includes react / redux / karma configurations that are brought into the project.
* Add webpack documentation