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/speedtest project.
- Observe the startup logs.
- Note that the
sed command modifies the $Sqlite_db_file variable in telemetry_settings.php.
- Check the
telemetry_settings.php file configuration for $Sqlite_db_file.
- Notice that the
sed command 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.php
This 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.
Description:
The Docker container for the project doesn't create the SQLite database as expected. Upon startup, the container runs a
sedcommand to modify thetelemetry_settings.phpfile, 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:
librespeed/speedtestproject.sedcommand modifies the$Sqlite_db_filevariable intelemetry_settings.php.telemetry_settings.phpfile configuration for$Sqlite_db_file.sedcommand does not match the line in the config.Expected Behavior:
The
sedcommand should properly update the$Sqlite_db_filevariable to ensure the database is created at the correct location (/database/db.sql).Actual Behavior:
The
sedcommand attempts to replace the$Sqlite_db_filepath, but the existing configuration intelemetry_settings.phpis as follows:This mismatch prevents the database from being created at the correct location.
Possible Cause:
The
sedcommand executed at container startup is:This command tries to replace the
$Sqlite_db_filevalue, but it doesn't account for the exact structure of the current line:Therefore, the database path isn't updated properly, leading to the failure of database creation.