From 89462cb100252073b86300bbb2faa4f34bee53ee Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 8 Nov 2020 14:24:54 +0100 Subject: [PATCH] prepare for deployment --- .gitignore | 1 + backend/backend/settings.py | 25 ++++++++----------- .../templates/multimail/aliases.html | 1 + .../templates/multimail/domains.html | 1 + .../templates/multimail/mailboxes.html | 1 + backend/requirements.txt | 9 +++++++ 6 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 backend/requirements.txt diff --git a/.gitignore b/.gitignore index ffee5f8..097ef35 100644 --- a/.gitignore +++ b/.gitignore @@ -202,3 +202,4 @@ dmypy.json # Pyre type checker .pyre/ +backend/config/ diff --git a/backend/backend/settings.py b/backend/backend/settings.py index da4f4ef..5226316 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -96,26 +96,23 @@ WSGI_APPLICATION = 'backend.wsgi.application' # https://docs.djangoproject.com/en/3.1/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - }, - 'mail': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'mail.sqlite3', - }, + # 'default': { + # 'ENGINE': 'django.db.backends.sqlite3', + # 'NAME': BASE_DIR / 'db.sqlite3', + # }, 'ldap': { 'ENGINE': 'ldapdb.backends.ldap', 'NAME': config.ldap.uri, 'USER': config.ldap.bind_dn, 'PASSWORD': config.ldap.bind_pass, }, - #'mysql': { - # 'NAME': 'user_data', - # 'ENGINE': 'django.db.backends.mysql', - # 'USER': 'mysql_user', - # 'PASSWORD': 'priv4te' - #} + 'default': { + 'HOST': config.sql.host, + 'NAME': config.sql.database, + 'ENGINE': 'django.db.backends.mysql', + 'USER': config.sql.user, + 'PASSWORD': config.sql.password + } } # Password validation diff --git a/backend/multimail/templates/multimail/aliases.html b/backend/multimail/templates/multimail/aliases.html index 7797fe3..40301cd 100644 --- a/backend/multimail/templates/multimail/aliases.html +++ b/backend/multimail/templates/multimail/aliases.html @@ -38,6 +38,7 @@ {% else %}

You haven't set up any aliases yet.

+ Add {% endif %} {% endblock %} \ No newline at end of file diff --git a/backend/multimail/templates/multimail/domains.html b/backend/multimail/templates/multimail/domains.html index 75e1098..d480a91 100644 --- a/backend/multimail/templates/multimail/domains.html +++ b/backend/multimail/templates/multimail/domains.html @@ -32,6 +32,7 @@ {% else %}

You haven't set up any domains yet.

+ Add {% endif %} {% endblock %} \ No newline at end of file diff --git a/backend/multimail/templates/multimail/mailboxes.html b/backend/multimail/templates/multimail/mailboxes.html index e58f27f..94220ad 100644 --- a/backend/multimail/templates/multimail/mailboxes.html +++ b/backend/multimail/templates/multimail/mailboxes.html @@ -32,6 +32,7 @@ {% else %}

You haven't set up any mailboxes yet.

+ Add {% endif %} {% endblock %} \ No newline at end of file diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..5021ea6 --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1,9 @@ +Django==3.1.3 +django-auth-ldap==2.2.0 +django-ldapdb==1.5.1 +django-static-fontawesome==5.14.0.0 +django-bootstrap4==2.3.1 +mysqlclient==2.0.1 +passlib==1.7.4 +python-ldap==3.3.1 +# djangorestframework==3.12.1