From bdfc11b20978ff0cf4b27403a34037733ffd1833 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 26 Feb 2017 08:38:16 +0000 Subject: [PATCH 1/6] Pin django-filter to latest version 1.0.1 --- requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/base.txt b/requirements/base.txt index 4a07499..5b5c559 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -59,4 +59,4 @@ django-autofixture==0.12.1 git+https://github.com/olymk2/scaffold.git djangorestframework -django-filter +django-filter==1.0.1 From 2b408e36283fe790dd33b97a978eaba1cd237383 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 26 Feb 2017 08:38:21 +0000 Subject: [PATCH 2/6] Update sphinx from 1.5.1 to 1.5.3 --- requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/local.txt b/requirements/local.txt index 3b0db77..ae09f59 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.3.1 django-coverage-plugin==1.5.0 -Sphinx==1.5.1 +Sphinx==1.5.3 django-extensions==1.7.7 Werkzeug==0.11.15 django-test-plus==1.0.16 From cdb939f23323ae410dc46fb70b67432602622a32 Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Sun, 26 Feb 2017 08:48:29 +0000 Subject: [PATCH 3/6] resolve migratioon conflicts --- .drone.yml | 5 +++-- .../base/migrations/0003_auto_20170215_2146.py | 2 +- .../base/migrations/0004_merge_20170226_0844.py | 16 ++++++++++++++++ .../users/migrations/0003_merge_20170226_0844.py | 16 ++++++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 mhackspace/base/migrations/0004_merge_20170226_0844.py create mode 100644 mhackspace/users/migrations/0003_merge_20170226_0844.py diff --git a/.drone.yml b/.drone.yml index 9e0aa96..abf0276 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,8 +27,9 @@ pipeline: script: - cd /var/www/stage/maidstone-hackspace-website - git pull - - docker-compose down - - docker-compose up -d + - docker-compose -fstage.yml build + - docker-compose -fstage.yml down + - docker-compose -fstage.yml up -d publish-live: # pull: True diff --git a/mhackspace/base/migrations/0003_auto_20170215_2146.py b/mhackspace/base/migrations/0003_auto_20170215_2146.py index 88e0fc3..3ade02c 100644 --- a/mhackspace/base/migrations/0003_auto_20170215_2146.py +++ b/mhackspace/base/migrations/0003_auto_20170215_2146.py @@ -16,7 +16,7 @@ class Migration(migrations.Migration): operations = [ migrations.AlterField( - model_name='bannerimages', + model_name='bannerimage', name='scaled_image', field=stdimage.models.StdImageField(blank=True, null=True, upload_to=stdimage.utils.UploadToAutoSlugClassNameDir('title'), validators=[stdimage.validators.MinSizeValidator(1200, 300)]), ), diff --git a/mhackspace/base/migrations/0004_merge_20170226_0844.py b/mhackspace/base/migrations/0004_merge_20170226_0844.py new file mode 100644 index 0000000..4a2a7da --- /dev/null +++ b/mhackspace/base/migrations/0004_merge_20170226_0844.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-02-26 08:44 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0003_auto_20170215_2146'), + ('base', '0003_auto_20170222_2055'), + ] + + operations = [ + ] diff --git a/mhackspace/users/migrations/0003_merge_20170226_0844.py b/mhackspace/users/migrations/0003_merge_20170226_0844.py new file mode 100644 index 0000000..fd2dcb0 --- /dev/null +++ b/mhackspace/users/migrations/0003_merge_20170226_0844.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-02-26 08:44 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0002_auto_20170222_2055'), + ('users', '0002_user_public'), + ] + + operations = [ + ] From f837f2229bc4eedf87d7fd6f975026dcda086692 Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Sun, 26 Feb 2017 10:03:14 +0000 Subject: [PATCH 4/6] Add local pip cache to avoid repeating downloads --- .drone.yml | 2 +- compose/django/Dockerfile | 2 +- compose/django/Dockerfile-dev | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index abf0276..ec85323 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,7 +28,7 @@ pipeline: - cd /var/www/stage/maidstone-hackspace-website - git pull - docker-compose -fstage.yml build - - docker-compose -fstage.yml down + - docker-compose -fstage.yml down --remove-orphans - docker-compose -fstage.yml up -d publish-live: diff --git a/compose/django/Dockerfile b/compose/django/Dockerfile index 6d9fde2..2a02570 100644 --- a/compose/django/Dockerfile +++ b/compose/django/Dockerfile @@ -5,7 +5,7 @@ ENV PYTHONUNBUFFERED 1 # Requirements have to be pulled and installed here, otherwise caching won't work COPY ./requirements /requirements -RUN pip install -r /requirements/production.txt \ +RUN pip install --cache-dir ./cache/pip -r /requirements/production.txt \ && groupadd -r django \ && useradd -r -g django django diff --git a/compose/django/Dockerfile-dev b/compose/django/Dockerfile-dev index 77373f2..70b4eba 100644 --- a/compose/django/Dockerfile-dev +++ b/compose/django/Dockerfile-dev @@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED 1 # Requirements have to be pulled and installed here, otherwise caching won't work COPY ./requirements /requirements -RUN pip install -r /requirements/local.txt +RUN pip install --cache-dir ./cache/pip -r /requirements/local.txt COPY ./compose/django/entrypoint.sh /entrypoint.sh RUN sed -i 's/\r//' /entrypoint.sh From 36b553fc020ad8f5ed96b76775b4129e2f9e3ced Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Sun, 26 Feb 2017 11:11:16 +0000 Subject: [PATCH 5/6] Copy the correct file, should be stage not live --- compose/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/django/Dockerfile b/compose/django/Dockerfile index 2a02570..a3d19d2 100644 --- a/compose/django/Dockerfile +++ b/compose/django/Dockerfile @@ -18,7 +18,7 @@ RUN mkdir -p /var/log/gunicorn/ \ && chmod -R 770 /var/log/gunicorn/ COPY ./compose/django/live-gunicorn-mhackspace.sh /live-gunicorn-mhackspace.sh -COPY ./compose/django/live-gunicorn-mhackspace.sh /stage-gunicorn-mhackspace.sh +COPY ./compose/django/stage-gunicorn-mhackspace.sh /stage-gunicorn-mhackspace.sh COPY ./compose/django/entrypoint.sh /entrypoint.sh RUN sed -i 's/\r//' /entrypoint.sh \ && sed -i 's/\r//' /stage-gunicorn-mhackspace.sh \ From 892f34802354045accb0761a4a4ae42c63132ab4 Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Sun, 26 Feb 2017 11:32:28 +0000 Subject: [PATCH 6/6] Fix typo --- compose/django/stage-gunicorn-mhackspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/django/stage-gunicorn-mhackspace.sh b/compose/django/stage-gunicorn-mhackspace.sh index d59987e..eae63f3 100644 --- a/compose/django/stage-gunicorn-mhackspace.sh +++ b/compose/django/stage-gunicorn-mhackspace.sh @@ -2,4 +2,4 @@ python /app/manage.py collectstatic --noinput python /app/manage.py compilescss -/usr/local/bin/gunicorn config.wsgi -w 4 -b unix:/data/sockets/stage-gunicorn-mhackpace.sock --error-logfile /var/log/gunicorn/stage-gunicorn-mhackspace.log --chdir=/app +/usr/local/bin/gunicorn config.wsgi -w 4 -b unix:/data/sockets/stage-gunicorn-mhackspace.sock --error-logfile /var/log/gunicorn/stage-gunicorn-mhackspace.log --chdir=/app