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 type checker
.pyre/ .pyre/
backend/config/

View file

@ -96,26 +96,23 @@ WSGI_APPLICATION = 'backend.wsgi.application'
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { # 'default': {
'ENGINE': 'django.db.backends.sqlite3', # 'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3', # 'NAME': BASE_DIR / 'db.sqlite3',
}, # },
'mail': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'mail.sqlite3',
},
'ldap': { 'ldap': {
'ENGINE': 'ldapdb.backends.ldap', 'ENGINE': 'ldapdb.backends.ldap',
'NAME': config.ldap.uri, 'NAME': config.ldap.uri,
'USER': config.ldap.bind_dn, 'USER': config.ldap.bind_dn,
'PASSWORD': config.ldap.bind_pass, 'PASSWORD': config.ldap.bind_pass,
}, },
#'mysql': { 'default': {
# 'NAME': 'user_data', 'HOST': config.sql.host,
# 'ENGINE': 'django.db.backends.mysql', 'NAME': config.sql.database,
# 'USER': 'mysql_user', 'ENGINE': 'django.db.backends.mysql',
# 'PASSWORD': 'priv4te' 'USER': config.sql.user,
#} 'PASSWORD': config.sql.password
}
} }
# Password validation # Password validation

View file

@ -38,6 +38,7 @@
</table> </table>
{% else %} {% else %}
<p>You haven't set up any aliases yet.</p> <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 %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -32,6 +32,7 @@
</table> </table>
{% else %} {% else %}
<p>You haven't set up any domains yet.</p> <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 %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -32,6 +32,7 @@
</table> </table>
{% else %} {% else %}
<p>You haven't set up any mailboxes yet.</p> <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 %} {% endif %}
{% endblock %} {% 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