Configuration#
To make SQL-Train more versatile and compatible with various server configurations and school structures, we paid attention to provide customization options through configuration files. There are two parts to the configuration:
config.json
: This file is used during the build process for styling and data customization..env
: This file is used at runtime for Docker and Django configuration.
Configuration is split into two parts:
config.json
Used a buildtime for styling and data.env
Used at runtime for docker and Django configuration
config.json#
THEME_COLORS
: This section enables you to style SQL-Train according to your preferences by specifying custom theme colors.FEEDBACK.SHOW
: By modifying this setting, you can control whether the feedback drawer is displayed or not.LMS_URL
: Students will be prompted to log in to the Learning Management System (LMS) located at the URL.LTI
: This section defines the properties displayed during LTI registration.
.env#
Please refer to the provided .env-example
file for an example configuration
and documentation. The .env file primarily contains Django configuration options
for SQL-Train. For detailed information about the available Django settings, it
is recommended to consult the Django documentation before making any
modifications.
# SPDX-FileCopyrightText: 2023 2023, Nicolas Bota, Marcel Geiger, Florian Paul, Rajbir Singh, Niklas Sirch, Jan Swiridow, Duc Minh Vu, Mike Wegele
#
# SPDX-License-Identifier: CC0-1.0
# Unsecure! Enables debug messages
DEBUG=0
# Enables SSL, Enables logging in /var/log/sql-training/info.log,
# Enables Memcache Backend, Enables Django DB Connection Pooling
# Enables API docs staff_required restriction
# Disables static media serving
DEPLOY=1
# Conninfo for Django DB
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=sql_training
SQL_USER=sql_training
SQL_PASSWORD=sql-training
SQL_HOST="172.17.0.1" # Docker
SQL_PORT=5432
# Conninfo for Memcache
MEMCACHE_HOST="172.17.0.1"
MEMCACHE_PORT=11211
# SQL-Train
# LINK_BASE for automatic registration link
LINK_BASE=sql-training.example.com
# Django allowed_hosts
ALLOWED_HOSTS=sql-training.example.com
# Database for tests and testing
PG_TEST_HOST= "postgres.example.com"
PG_TEST_PORT = 5432
PG_TEST_USER = "SET"
PG_TEST_PASSWORD = "SET"
PG_TEST_DB = "SET"
# Database for students
PG_TEST_HOST= "postgres.example.com"
PG_STUD_PORT = 5432