From 77a00376e8195b73fae5c3dd80efdf5d9b432e3f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 5 Sep 2020 00:40:41 +0000 Subject: [PATCH 01/14] Auto-update pre-commit hooks --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index affb6929a..74839c2c0 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: black - repo: https://github.com/timothycrosley/isort - rev: 5.5.0 + rev: 5.5.1 hooks: - id: isort From 4659cb9baa82388436e7e2731359dde4bd58a433 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 6 Sep 2020 02:16:23 +0000 Subject: [PATCH 02/14] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93b4b9ef1..bc397c7ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2020-09-05] +### Updated +- Auto-update pre-commit hooks ([#2793](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2793)) + ## [2020-09-04] ### Updated - Update django-extensions to 3.0.8 ([#2792](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2792)) From 9cdae535b3b56656e495d544d8f5de461f2c8321 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 6 Sep 2020 19:12:31 -0700 Subject: [PATCH 03/14] Update psycopg2-binary from 2.8.5 to 2.8.6 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 144214104..dad44f822 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -5,7 +5,7 @@ ipdb==0.13.3 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} -psycopg2-binary==2.8.5 # https://github.com/psycopg/psycopg2 +psycopg2-binary==2.8.6 # https://github.com/psycopg/psycopg2 {%- endif %} {%- if cookiecutter.use_async == 'y' %} watchgod==0.6 # https://github.com/samuelcolvin/watchgod From cbc46cb34f80235831f332168b895a707e4b12b9 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 7 Sep 2020 14:23:02 +0200 Subject: [PATCH 04/14] Update psycopg2 from 2.8.5 to 2.8.6 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index dad44f822..998905a05 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -3,7 +3,7 @@ Werkzeug==1.0.1 # https://github.com/pallets/werkzeug ipdb==0.13.3 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} -psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 +psycopg2==2.8.6 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} psycopg2-binary==2.8.6 # https://github.com/psycopg/psycopg2 {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 607faed3f..31e576288 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -3,7 +3,7 @@ -r base.txt gunicorn==20.0.4 # https://github.com/benoitc/gunicorn -psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 +psycopg2==2.8.6 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} From 7fb71507d2f29049a9b446e4c20122fcaa849911 Mon Sep 17 00:00:00 2001 From: Arnav Choudhury Date: Mon, 7 Sep 2020 17:58:49 +0530 Subject: [PATCH 05/14] Updated Gitlab CI to use Python 3.8 instead of Python 3.7 (#2794) --- CONTRIBUTORS.md | 2 +- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0174628e5..2d17cddfe 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1463,4 +1463,4 @@ guidance and advice. - Jannis Leidel - Nate Aune -- Barry Morrison \ No newline at end of file +- Barry Morrison diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index 246c4c982..60925b811 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -13,7 +13,7 @@ variables: flake8: stage: lint - image: python:3.7-alpine + image: python:3.8-alpine before_script: - pip install -q flake8 script: @@ -21,7 +21,7 @@ flake8: pytest: stage: test - image: python:3.7 + image: python:3.8 {% if cookiecutter.use_docker == 'y' -%} image: docker/compose:latest tags: @@ -39,7 +39,7 @@ pytest: tags: - python services: - - postgres:11 + - postgres:{{ cookiecutter.postgresql_version }} variables: DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB From 17fbe5f4c6b37b45121779b9c5b17f192a338076 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 7 Sep 2020 12:29:24 +0000 Subject: [PATCH 06/14] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/contributors.json b/.github/contributors.json index 714880995..8c2180bd1 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1027,5 +1027,10 @@ "name": "Corey Garvey", "github_login": "coreygarvey", "twitter_username": "" + }, + { + "name": "Arnav Choudhury", + "github_login": "arnav13081994", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 2d17cddfe..69ea53f3f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -264,6 +264,13 @@ Listed in alphabetical order. + + Arnav Choudhury + + arnav13081994 + + + AsheKR @@ -1463,4 +1470,4 @@ guidance and advice. - Jannis Leidel - Nate Aune -- Barry Morrison +- Barry Morrison \ No newline at end of file From 624dd94dd3738d50f91655d350ca9bf22b6af68f Mon Sep 17 00:00:00 2001 From: Wes Turner <50891+westurner@users.noreply.github.com> Date: Mon, 7 Sep 2020 08:51:52 -0400 Subject: [PATCH 07/14] Add :z/:Z to mounted volumes in {local,production}.yml (#2663) --- {{cookiecutter.project_slug}}/local.yml | 14 +++++++------- {{cookiecutter.project_slug}}/production.yml | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index 528e59b2c..a6cbe5430 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -17,7 +17,7 @@ services: - mailhog {%- endif %} volumes: - - .:/app + - .:/app:z env_file: - ./.envs/.local/.django - ./.envs/.local/.postgres @@ -32,8 +32,8 @@ services: image: {{ cookiecutter.project_slug }}_production_postgres container_name: postgres volumes: - - local_postgres_data:/var/lib/postgresql/data - - local_postgres_data_backups:/backups + - local_postgres_data:/var/lib/postgresql/data:Z + - local_postgres_data_backups:/backups:z env_file: - ./.envs/.local/.postgres @@ -46,9 +46,9 @@ services: env_file: - ./.envs/.local/.django volumes: - - ./docs:/docs - - ./config:/app/config - - ./{{ cookiecutter.project_slug }}:/app/{{ cookiecutter.project_slug }} + - ./docs:/docs:z + - ./config:/app/config:z + - ./{{ cookiecutter.project_slug }}:/app/{{ cookiecutter.project_slug }}:z ports: - "7000:7000" @@ -113,7 +113,7 @@ services: depends_on: - django volumes: - - .:/app + - .:/app:z # http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html - /app/node_modules command: npm run dev diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 2cd2af132..93b61b134 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -25,8 +25,8 @@ services: dockerfile: ./compose/production/postgres/Dockerfile image: {{ cookiecutter.project_slug }}_production_postgres volumes: - - production_postgres_data:/var/lib/postgresql/data - - production_postgres_data_backups:/backups + - production_postgres_data:/var/lib/postgresql/data:Z + - production_postgres_data_backups:/backups:z env_file: - ./.envs/.production/.postgres @@ -38,7 +38,7 @@ services: depends_on: - django volumes: - - production_traefik:/etc/traefik/acme + - production_traefik:/etc/traefik/acme:z ports: - "0.0.0.0:80:80" - "0.0.0.0:443:443" @@ -75,5 +75,5 @@ services: env_file: - ./.envs/.production/.django volumes: - - production_postgres_data_backups:/backups + - production_postgres_data_backups:/backups:z {%- endif %} From 756cf6c93545fa43e4330d52ec48bb49a9272925 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 7 Sep 2020 12:52:21 +0000 Subject: [PATCH 08/14] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index 8c2180bd1..4f2f96dfa 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1032,5 +1032,10 @@ "name": "Arnav Choudhury", "github_login": "arnav13081994", "twitter_username": "" + }, + { + "name": "Wes Turner", + "github_login": "westurner", + "twitter_username": "westurner" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 69ea53f3f..e0fda25ed 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1426,6 +1426,13 @@ Listed in alphabetical order. + + Wes Turner + + westurner + + westurner + Will Farley From 0b3dd776c624184cd89dde2b28d81625f1914112 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 7 Sep 2020 15:06:18 +0200 Subject: [PATCH 09/14] Fix options for sphinx-autobuild in docs Makefile (#2799) Fix #2796 --- {{cookiecutter.project_slug}}/docs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/docs/Makefile b/{{cookiecutter.project_slug}}/docs/Makefile index 90f61de32..4f772cade 100644 --- a/{{cookiecutter.project_slug}}/docs/Makefile +++ b/{{cookiecutter.project_slug}}/docs/Makefile @@ -22,9 +22,9 @@ help: # Build, watch and serve docs with live reload livehtml: sphinx-autobuild -b html - {%- if cookiecutter.use_docker == 'y' %} -H 0.0.0.0 + {%- if cookiecutter.use_docker == 'y' %} --host 0.0.0.0 {%- else %} --open-browser - {%- endif %} -p 7000 --watch $(APP) -c . $(SOURCEDIR) $(BUILDDIR)/html + {%- endif %} --port 7000 --watch $(APP) -c . $(SOURCEDIR) $(BUILDDIR)/html # Outputs rst files from django application code apidocs: From ffaec0008405dc528ba869a780c7ec61a36d0942 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 7 Sep 2020 15:10:57 +0200 Subject: [PATCH 10/14] Remove --no-binary option for psycopg2 (#2798) It was required in 2.7, but it's now the default in 2.8 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 998905a05..cc751326f 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -3,7 +3,7 @@ Werkzeug==1.0.1 # https://github.com/pallets/werkzeug ipdb==0.13.3 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} -psycopg2==2.8.6 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 +psycopg2==2.8.6 # https://github.com/psycopg/psycopg2 {%- else %} psycopg2-binary==2.8.6 # https://github.com/psycopg/psycopg2 {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 31e576288..8016786cf 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -3,7 +3,7 @@ -r base.txt gunicorn==20.0.4 # https://github.com/benoitc/gunicorn -psycopg2==2.8.6 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 +psycopg2==2.8.6 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} From 8eab7bbdb578f943f5cd5af02a7e68b29150f115 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 8 Sep 2020 02:16:41 +0000 Subject: [PATCH 11/14] Update Changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc397c7ca..4c42b8695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2020-09-07] +### Changed +- Add :z/:Z to mounted volumes in {local,production}.yml ([#2663](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2663)) +- Remove --no-binary option for psycopg2 ([#2798](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2798)) +- Updated Gitlab CI to use Python 3.8 instead of Python 3.7 ([#2794](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2794)) +### Fixed +- Fix options for sphinx-autobuild in docs Makefile ([#2799](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2799)) +### Updated +- Update psycopg2-binary to 2.8.6 ([#2797](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2797)) + ## [2020-09-05] ### Updated - Auto-update pre-commit hooks ([#2793](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2793)) From 536e86ecadb66a9f37315a73af4dd6255a5a2f39 Mon Sep 17 00:00:00 2001 From: Arnav Choudhury Date: Tue, 8 Sep 2020 13:34:10 +0530 Subject: [PATCH 12/14] Traeffik and Django dockerfile changes (#2801) --- CONTRIBUTORS.md | 2 +- .../compose/production/django/Dockerfile | 16 ++++++++-------- .../compose/production/traefik/Dockerfile | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e0fda25ed..dd55e2af2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1477,4 +1477,4 @@ guidance and advice. - Jannis Leidel - Nate Aune -- Barry Morrison \ No newline at end of file +- Barry Morrison diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 72f71d6ec..2e6a195b7 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -32,26 +32,26 @@ COPY ./requirements /requirements RUN pip install --no-cache-dir -r /requirements/production.txt \ && rm -rf /requirements -COPY ./compose/production/django/entrypoint /entrypoint +COPY --chown=django:django ./compose/production/django/entrypoint /entrypoint RUN sed -i 's/\r$//g' /entrypoint RUN chmod +x /entrypoint -RUN chown django /entrypoint -COPY ./compose/production/django/start /start + +COPY --chown=django:django ./compose/production/django/start /start RUN sed -i 's/\r$//g' /start RUN chmod +x /start -RUN chown django /start + {%- if cookiecutter.use_celery == "y" %} -COPY ./compose/production/django/celery/worker/start /start-celeryworker +COPY --chown=django:django ./compose/production/django/celery/worker/start /start-celeryworker RUN sed -i 's/\r$//g' /start-celeryworker RUN chmod +x /start-celeryworker -RUN chown django /start-celeryworker -COPY ./compose/production/django/celery/beat/start /start-celerybeat + +COPY --chown=django:django ./compose/production/django/celery/beat/start /start-celerybeat RUN sed -i 's/\r$//g' /start-celerybeat RUN chmod +x /start-celerybeat -RUN chown django /start-celerybeat + COPY ./compose/production/django/celery/flower/start /start-flower RUN sed -i 's/\r$//g' /start-flower diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index 746aa2b48..26a653d50 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,5 +1,5 @@ FROM traefik:v2.0 -RUN mkdir -p /etc/traefik/acme -RUN touch /etc/traefik/acme/acme.json -RUN chmod 600 /etc/traefik/acme/acme.json +RUN mkdir -p /etc/traefik/acme \ + && touch /etc/traefik/acme/acme.json \ + && chmod 600 /etc/traefik/acme/acme.json COPY ./compose/production/traefik/traefik.yml /etc/traefik From 69209b6fa16147e0260d7e934910fdfa90e3780f Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 8 Sep 2020 08:04:49 +0000 Subject: [PATCH 13/14] Update Contributors --- CONTRIBUTORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index dd55e2af2..e0fda25ed 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1477,4 +1477,4 @@ guidance and advice. - Jannis Leidel - Nate Aune -- Barry Morrison +- Barry Morrison \ No newline at end of file From b3028d8299879916097f8f83c6d1f2093d2f0365 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 9 Sep 2020 02:17:01 +0000 Subject: [PATCH 14/14] Update Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c42b8695..dd8b927d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## [2020-09-08] +### Changed +- Traeffik and Django dockerfile changes ([#2801](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2801)) + ## [2020-09-07] ### Changed - Add :z/:Z to mounted volumes in {local,production}.yml ([#2663](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2663))