From 49bc130b16a986b7c58601d06fdc3e4bb480e045 Mon Sep 17 00:00:00 2001 From: Tom Dyson Date: Mon, 11 Dec 2017 12:11:27 +0000 Subject: [PATCH] simple Dockerfile --- CHANGELOG.txt | 1 + docs/releases/2.0.rst | 1 + wagtail/project_template/Dockerfile | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 wagtail/project_template/Dockerfile diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 95292bb006..0d131d9522 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -35,6 +35,7 @@ Changelog * Form submission csv exports now have the export date in the filename and can be customized (Johan Arensman) * FormBuilder class now uses bound methods for field generation, adding custom fields is now easier and documented (LB (Ben) Johnston) * Added `WAGTAILADMIN_NOTIFICATION_INCLUDE_SUPERUSERS` setting to determine whether superusers are included in moderation email notifications (Bruno Alla) + * Added a basic Dockerfile to the project template (Tom Dyson) * Fix: Do not remove stopwords when generating slugs from non-ASCII titles, to avoid issues with incorrect word boundaries (Sævar Öfjörð Magnússon) * Fix: The PostgreSQL search backend now preserves ordering of the `QuerySet` when searching with `order_by_relevance=False` (Bertrand Bordage) * Fix: Using `modeladmin_register` as a decorator no longer replaces the decorated class with `None` (Tim Heap) diff --git a/docs/releases/2.0.rst b/docs/releases/2.0.rst index 3633304ea6..59248926c0 100644 --- a/docs/releases/2.0.rst +++ b/docs/releases/2.0.rst @@ -52,6 +52,7 @@ Other features * Form submission csv exports now have the export date in the filename and can be customized (Johan Arensman) * FormBuilder class now uses bound methods for field generation, adding custom fields is now easier and documented (LB (Ben Johnston)) * Added ``WAGTAILADMIN_NOTIFICATION_INCLUDE_SUPERUSERS`` setting to determine whether superusers are included in moderation email notifications (Bruno Alla) + * Added a basic Dockerfile to the project template (Tom Dyson) Bug fixes diff --git a/wagtail/project_template/Dockerfile b/wagtail/project_template/Dockerfile new file mode 100644 index 0000000000..074893854f --- /dev/null +++ b/wagtail/project_template/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.6 +LABEL maintainer="hello@wagtail.io" + +ENV PYTHONUNBUFFERED 1 +ENV DJANGO_ENV dev + +COPY ./requirements.txt /code/requirements.txt +RUN pip install -r /code/requirements.txt +RUN pip install gunicorn + +COPY . /code/ +WORKDIR /code/ + +RUN python manage.py migrate + +RUN useradd wagtail +RUN chown -R wagtail /code +USER wagtail + +EXPOSE 8000 +CMD exec gunicorn {{ project_name }}.wsgi:application --bind 0.0.0.0:8000 --workers 3