diff --git a/etc/sample_stacktach_config.sh b/etc/sample_stacktach_config.sh index 72f5c1e..d59a602 100644 --- a/etc/sample_stacktach_config.sh +++ b/etc/sample_stacktach_config.sh @@ -2,6 +2,7 @@ export STACKTACH_DB_NAME="stacktach" export STACKTACH_DB_HOST="" export STACKTACH_DB_USERNAME="root" export STACKTACH_DB_PASSWORD="password" +export STACKTACH_DB_PORT="3306" export STACKTACH_INSTALL_DIR="/srv/www/stacktach/" export STACKTACH_DEPLOYMENTS_FILE="/srv/www/stacktach/stacktach_worker_config.json" diff --git a/settings.py b/settings.py index fec44ea..7d0e86a 100644 --- a/settings.py +++ b/settings.py @@ -9,6 +9,7 @@ try: db_host = STACKTACH_DB_HOST db_username = STACKTACH_DB_USERNAME db_password = STACKTACH_DB_PASSWORD + db_port = STACKTACH_DB_PORT install_dir = STACKTACH_INSTALL_DIR except ImportError: db_engine = os.environ.get('STACKTACH_DB_ENGINE', @@ -17,6 +18,7 @@ except ImportError: db_host = os.environ.get('STACKTACH_DB_HOST', "") db_username = os.environ['STACKTACH_DB_USERNAME'] db_password = os.environ['STACKTACH_DB_PASSWORD'] + db_port = os.environ.get('STACKTACH_DB_PORT', "") install_dir = os.environ['STACKTACH_INSTALL_DIR'] DEBUG = False @@ -35,7 +37,7 @@ DATABASES = { 'USER': db_username, 'PASSWORD': db_password, 'HOST': db_host, # Set to empty string for localhost. - 'PORT': '', # Set to empty string for default. + 'PORT': db_port, # Set to empty string for default. } }