Gestor de Torneos reads its database connection parameters from environment variables. All other configuration is currently hardcoded in config/settings.py.
Database variables
| Variable | Description | Default | Required |
|---|
DB_NAME | MySQL database name | tfg | No |
DB_USER | MySQL user | tfg | No |
DB_PASSWORD | MySQL password | tfg | No |
DB_HOST | MySQL host | db | No |
DB_PORT | MySQL port | 3306 | No |
All five variables have defaults that match the values used in the bundled docker-compose.yml. In production you should override every one of them.
docker-compose.yml example
The repository ships with the following environment block for the application service:
services:
gestor_torneos:
environment:
DB_NAME: tfg
DB_USER: tfg
DB_PASSWORD: tfg
DB_HOST: db
DB_PORT: "3306"
The db service uses the matching MySQL variables:
db:
image: mysql:8.4
environment:
MYSQL_DATABASE: tfg
MYSQL_USER: tfg
MYSQL_PASSWORD: tfg
MYSQL_ROOT_PASSWORD: root
DB_HOST defaults to db, which is the service name defined in docker-compose.yml. If you run the database on a different host or without Docker Compose, set DB_HOST accordingly.
Security warnings
SECRET_KEY is hardcoded in config/settings.py with an insecure development value. You must replace it with a strong, unique key before deploying to any environment accessible over a network. Set it via an environment variable or a secrets manager — never commit a real secret key to version control.
DEBUG = True is set in config/settings.py. Debug mode must be disabled in production by setting DEBUG = False. Running with DEBUG=True exposes detailed error pages and internal configuration to end users.
ALLOWED_HOSTS = ["*"] is configured for development convenience. In production, restrict this to the actual hostname(s) of your deployment.