mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-07 13:34:53 +03:00
Merge branch 'master' into adopt-a-better-approach-to-env-variable-handing-with-docker
This commit is contained in:
commit
82bbe8b7de
|
@ -146,6 +146,7 @@ Listed in alphabetical order.
|
|||
Travis McNeill `@Travistock`_ @tavistock_esq
|
||||
Vitaly Babiy
|
||||
Vivian Guillen `@viviangb`_
|
||||
Wan Liuyang `@sfdye`_ @sfdye
|
||||
Will Farley `@goldhand`_ @g01dhand
|
||||
William Archinal `@archinal`_
|
||||
Yaroslav Halchenko
|
||||
|
@ -223,6 +224,7 @@ Listed in alphabetical order.
|
|||
.. _@shireenrao: https://github.com/shireenrao
|
||||
.. _@webyneter: https://github.com/webyneter
|
||||
.. _@show0k: https://github.com/show0k
|
||||
.. _@sfdye: https://github.com/sfdye
|
||||
.. _@shultz: https://github.com/shultz
|
||||
.. _@siauPatrick: https://github.com/siauPatrick
|
||||
.. _@slafs: https://github.com/slafs
|
||||
|
|
|
@ -43,7 +43,7 @@ Features
|
|||
* Grunt build for compass and livereload
|
||||
* Send emails via Anymail_ (using Mailgun_ by default, but switchable)
|
||||
* Media storage using Amazon S3
|
||||
* Docker support using docker-compose_ for development and production (using _Caddy with LetsEncrypt support)
|
||||
* Docker support using docker-compose_ for development and production (using Caddy_ with LetsEncrypt_ support)
|
||||
* Procfile_ for deploying to Heroku
|
||||
* Instructions for deploying to PythonAnywhere_
|
||||
* Run tests with unittest or py.test
|
||||
|
@ -80,6 +80,7 @@ Optional Integrations
|
|||
.. _Opbeat: https://opbeat.com/
|
||||
.. _PythonAnywhere: https://www.pythonanywhere.com/
|
||||
.. _Caddy: https://caddyserver.com/
|
||||
.. _LetsEncrypt: https://letsencrypt.org/
|
||||
|
||||
Constraints
|
||||
-----------
|
||||
|
|
|
@ -7,5 +7,5 @@ binaryornot==0.4.4
|
|||
pytest==3.2.1
|
||||
pep8==1.7.0
|
||||
pyflakes==1.6.0
|
||||
tox==2.7.0
|
||||
tox==2.8.0
|
||||
pytest-cookies==0.2.0
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
www.{% raw %}{%DOMAIN_NAME%}{% endraw %} {
|
||||
www.{% raw %}{$DOMAIN_NAME}{% endraw %} {
|
||||
redir https://{{cookiecutter.domain_name}}
|
||||
}
|
||||
|
||||
{% raw %}{%DOMAIN_NAME%}{% endraw %} {
|
||||
{% raw %}{$DOMAIN_NAME}{% endraw %} {
|
||||
proxy / django:5000 {
|
||||
header_upstream Host {host}
|
||||
header_upstream X-Real-IP {remote}
|
||||
|
|
|
@ -3,7 +3,7 @@ Production Configurations
|
|||
|
||||
{% if cookiecutter.use_whitenoise == 'y' -%}
|
||||
- Use WhiteNoise for serving static files{% endif %}
|
||||
- Use Amazon's S3 for {% if cookiecutter.use_whitenoise == 'n' -%}storing static files {% endif %}and uploaded media
|
||||
- Use Amazon's S3 for storing {% if cookiecutter.use_whitenoise == 'n' -%}static files and {% endif %}uploaded media
|
||||
- Use mailgun to send emails
|
||||
- Use Redis for cache
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
||||
|
|
|
@ -25,14 +25,6 @@ Switch to *Docker Compose* and select `local.yml` file from directory of your pr
|
|||
|
||||
.. image:: images/4.png
|
||||
|
||||
Because Pycharm restarts container every time you use Configuration Run, to not have server restarted during running tests, we defined second service in `local.yml` file called pycharm. To use it, you have to add interpreter of second service as well.
|
||||
|
||||
.. image:: images/5.png
|
||||
|
||||
The final result should be:
|
||||
|
||||
.. image:: images/6.png
|
||||
|
||||
Having that, click *OK*. Close *Settings* panel, and wait few seconds...
|
||||
|
||||
.. image:: images/7.png
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 110 KiB |
Binary file not shown.
Before Width: | Height: | Size: 67 KiB |
|
@ -8,7 +8,7 @@ services:
|
|||
django: &django
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./compose/django/Dockerfile-dev
|
||||
dockerfile: ./compose/django/Dockerfile-local
|
||||
depends_on:
|
||||
- postgres{% if cookiecutter.use_mailhog == 'y' %}
|
||||
- mailhog{% endif %}
|
||||
|
@ -28,19 +28,6 @@ services:
|
|||
- postgres_backup_dev:/backups
|
||||
env_file:
|
||||
- ./.envs/.local/.postgres
|
||||
{% if cookiecutter.use_pycharm == 'y' %}
|
||||
pycharm:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./compose/django/Dockerfile-dev
|
||||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- .:/app
|
||||
env_file:
|
||||
- ./.env/.local/.django
|
||||
- ./.env/.local/.postgres
|
||||
{% endif %}
|
||||
{% if cookiecutter.use_mailhog == 'y' %}
|
||||
mailhog:
|
||||
image: mailhog/mailhog:v1.0.0
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[pytest]
|
||||
addopts = --exitfirst
|
||||
DJANGO_SETTINGS_MODULE=config.settings.test
|
||||
|
|
|
@ -16,7 +16,6 @@ whitenoise==3.3.0
|
|||
|
||||
|
||||
# Forms
|
||||
django-braces==1.11.0
|
||||
django-crispy-forms==1.6.1
|
||||
|
||||
# Models
|
||||
|
@ -37,7 +36,7 @@ django-allauth==0.33.0
|
|||
# from http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg
|
||||
{% else %}
|
||||
# Python-PostgreSQL Database Adapter
|
||||
psycopg2==2.7.3
|
||||
psycopg2==2.7.3.1
|
||||
{%- endif %}
|
||||
|
||||
# Unicode slugification
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# Python-PostgreSQL Database Adapter
|
||||
# If using Win for dev, this assumes Unix in prod
|
||||
# ------------------------------------------------
|
||||
psycopg2==2.7.3
|
||||
psycopg2==2.7.3.1
|
||||
{%- endif %}
|
||||
|
||||
# WSGI Handler
|
||||
|
@ -16,7 +16,7 @@ gunicorn==19.7.1
|
|||
|
||||
# Static and Media Storage
|
||||
# ------------------------------------------------
|
||||
boto3==1.4.6
|
||||
boto3==1.4.7
|
||||
django-storages==1.6.5
|
||||
{% if cookiecutter.use_whitenoise != 'y' -%}
|
||||
Collectfast==0.5.2
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% if cookiecutter.windows == 'y' -%}
|
||||
# Python-PostgreSQL Database Adapter
|
||||
# If using Win for dev, this assumes Unix in test/prod
|
||||
psycopg2==2.7.3
|
||||
psycopg2==2.7.3.1
|
||||
{%- endif %}
|
||||
|
||||
coverage==4.4.1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% raw %}{% load staticfiles i18n {% endraw %}{% if cookiecutter.use_compressor == "y" %}compress{% endif %}{% raw %}%}<!DOCTYPE html>
|
||||
{% raw %}{% load static i18n {% endraw %}{% if cookiecutter.use_compressor == "y" %}compress{% endif %}{% raw %}%}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
|
Loading…
Reference in New Issue
Block a user