prepare for deployment

This commit is contained in:
j3d1 2020-11-08 14:24:54 +01:00
parent 0889937ea3
commit 89462cb100
6 changed files with 24 additions and 14 deletions

1
.gitignore vendored
View file

@ -202,3 +202,4 @@ dmypy.json
# Pyre type checker
.pyre/
backend/config/

View file

@ -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

View file

@ -38,6 +38,7 @@
</table>
{% else %}
<p>You haven't set up any aliases yet.</p>
<a href="{% url 'multimail:new_alias' %}" class="btn btn-primary btn-sm m-0">Add</a>
{% endif %}
{% endblock %}

View file

@ -32,6 +32,7 @@
</table>
{% else %}
<p>You haven't set up any domains yet.</p>
<a href="{% url 'multimail:new_domain' %}" class="btn btn-primary btn-sm m-0">Add</a>
{% endif %}
{% endblock %}

View file

@ -32,6 +32,7 @@
</table>
{% else %}
<p>You haven't set up any mailboxes yet.</p>
<a href="{% url 'multimail:new_mailbox' %}" class="btn btn-primary btn-sm m-0">Add</a>
{% endif %}
{% endblock %}

9
backend/requirements.txt Normal file
View file

@ -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