-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Description:
The Docker container for the project doesn't create the SQLite database as expected. Upon startup, the container runs a sed command to modify the telemetry_settings.php file, but this change doesn't align with the actual configuration line in the file. As a result, the SQLite database isn't created.
Steps to Reproduce:
- Run the Docker container for the
librespeed/speedtestproject. - Observe the startup logs.
- Note that the
sedcommand modifies the$Sqlite_db_filevariable intelemetry_settings.php. - Check the
telemetry_settings.phpfile configuration for$Sqlite_db_file. - Notice that the
sedcommand does not match the line in the config.
Expected Behavior:
The sed command should properly update the $Sqlite_db_file variable to ensure the database is created at the correct location (/database/db.sql).
Actual Behavior:
The sed command attempts to replace the $Sqlite_db_file path, but the existing configuration in telemetry_settings.php is as follows:
// Sqlite3 settings
$Sqlite_db_file = __DIR__ . '/../../speedtest_telemetry.db';This mismatch prevents the database from being created at the correct location.
Possible Cause:
The sed command executed at container startup is:
sed -i 's/$Sqlite_db_file = '\''.*'\''/$Sqlite_db_file='\''\/database\/db.sql'\''/g' /var/www/html/results/telemetry_settings.phpThis command tries to replace the $Sqlite_db_file value, but it doesn't account for the exact structure of the current line:
$Sqlite_db_file = __DIR__ . '/../../speedtest_telemetry.db';Therefore, the database path isn't updated properly, leading to the failure of database creation.