-
-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
infraPerformance & InfrastructurePerformance & InfrastructuresecuritySecurity-related issues, vulnerabilities, and etcSecurity-related issues, vulnerabilities, and etc
Milestone
Description
What problem are you trying to solve?
Be able to run poweradmin as a readonly image
What would you like implemented?
The current implementation uses a hardcoded CONFIG_FILE (/app/config/settings.php) and this is updated in entrypoint,
However, to increase security (immutable image), it would be a good thing to be able to have config file path configurable so that we can mount this r/w volume (and php run dirs etc) outside container. both std docker and in k8s.
So atm there is a PA_CONFIG_PATH which is read and then written to CONFIG_FILE.
- CONFIG_FILE="${CUSTOM_CONFIG_FILE:-/app/config/settings.php}"
- Extend AppInitializer and ConfigurationManager to support this env variable
Maybe by a
class EnvReader
{
public static function get(string $key, $default = null)
{
$value = getenv($key);
if ($value === false) {
return $default;
}
return $value;
}
}
This is just a very rough draft on my part :-)
Maybe there are better ways of implementing this also....
/hw
Additional context (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
infraPerformance & InfrastructurePerformance & InfrastructuresecuritySecurity-related issues, vulnerabilities, and etcSecurity-related issues, vulnerabilities, and etc