'parsemail' and 'parsearchive' are slow. When messing with models and
migrations, it can be very useful to backup the database in its current
state and restore it if/when you mess up. Currently, we've documented
how to do this via some commands run in the shell of the container, but
we can do things easier via an application designed for this purpose:
'django-dbshell'.
Signed-off-by: Stephen Finucane <stephen@that.guru>
# docker-compose configuration files
/.env
+
+# django-dbbackup files
+/.backups
from .base import * # noqa
+try:
+ import dbbackup
+except ImportError:
+ dbbackup = None
+
#
# Core settings
# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
'172.18.0.1'
]
+# django-dbbackup
+
+if dbbackup:
+ INSTALLED_APPS += [
+ 'dbbackup',
+ ]
+
+ DBBACKUP_STORAGE_OPTIONS = {'location': '.backups'}
#
# Patchwork settings
djangorestframework==3.8.2
django-filter==2.0.0; python_version >= '3.4'
django-filter==1.1.0; python_version < '3.0' # pyup: ignore
+django-dbbackup==3.2.0
-r requirements-test.txt