4. Production Use - csandker/Playbooks GitHub Wiki

Currently this project is published in debug mode to ease development.

Django has buildin functionality to check an application for production usage by running:

python3 manage.py check --deploy

Some of the production steps has been added to the Docker Container here

Edit the settings.json with production settings:

{
    "SECRET_KEY": "YOUR RANDOM KEY HERE",
    
    "PROD_ENV": 1,

    "ALLOWED_HOSTS": "['YOUR-DOMAIN-HERE']"
}

Database Currently SQLite3 is used for development, in production you may want to use a more robust/scalable DB. Change this in https://github.com/csandker/Playbooks/blob/master/App/PlayBooksWeb/settings.py

# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
SQLITE3_PATH = settings['SQLITE3_PATH'] if 'SQLITE3_PATH' in settings else os.path.join(BASE_DIR, 'db.sqlite3')
SQLite3_DB = {
    'ENGINE': 'django.db.backends.sqlite3',
    'NAME': SQLITE3_PATH
}

DATABASES = {
    'default': SQLite3_DB
}