Django-Helpdesk Standalone Installation¶
Installation¶
Clone the django-helpdesk repository:
git clone git@github.com:django-helpdesk/django-helpdesk.git
Go to the standalone helpdesk installation directory:
cd django-helpdesk/standalone
Execute the installation script:
./setup.sh
Start the services:
docker-compose up
Creating an Admin User¶
List the running containers:
docker psExecute into the standalone-django-helpdesk-1 container:
docker exec -it standalone-django-helpdesk-1 bash
Change directory to the application’s root:
cd /opt/django-helpdesk/standalone
Create a superuser:
python3 manage.py createsuperuser
Visit localhost:80 in your browser to access the server. Navigate to the /admin URL to set up new users. Ensure to configure the “Site” in the admin section for ticket email URLs to function correctly.
Configuration for Production Use¶
Update the Caddyfile to replace the localhost URL with your desired production URL.
Modify the docker-compose file to adjust the paths. By default, files are stored in /tmp.
For custom configurations, bindmount a local_settings.py into /opt/django-helpdesk/standalone/config/local_settings.py.
To customize the logo in the top-left corner of the helpdesk:
<style> .navbar-brand { background: url("https://www.libertyaces.com/files/liberty-logo.png") no-repeat; background-size: auto; width: 320px; background-size: contain; height: 40px; text-align: right; } </style>
AWS SES Email Configuration¶
An example local_settings configuration for utilizing AWS SES for email:
from .settings import *
import os
DEFAULT_FROM_EMAIL = "support@bitswan.space"
SERVER_EMAIL = "support@bitswan.space"
AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID")
EMAIL_BACKEND = "django_ses.SESBackend"
AWS_SES_REGION_NAME = "eu-west-1"
AWS_SES_REGION_ENDPOINT = "email.eu-west-1.amazonaws.com"
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY")
To integrate django-ses, bindmount a file to /opt/extra-dependencies.txt containing:
django-ses
Make sure you update the docker.env file with the necessary secrets.
S3 base attachment support¶
Working from the previous SES example we add the following to local_settings:
AWS_S3_REGION_NAME = os.environ.get("AWS_S3_REGION_NAME", "eu-central-1")
AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME", "bitswan-helpdesk-attachments")
AWS_QUERYSTRING_AUTH = os.environ.get("AWS_QUERYSTRING_AUTH", True)
AWS_QUERYSTRING_EXPIRE = os.environ.get(
"AWS_QUERYSTRING_EXPIRE", 60 * 60
)
AWS_DEFAULT_ACL = "private"
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
To integrate django-ses, bindmount a file to /opt/extra-dependencies.txt containing:
django-storages
boto3