feat: customizable PHP memory_limit via Helm and Docker env var#165
Closed
eduardofraga wants to merge 3 commits into
Closed
feat: customizable PHP memory_limit via Helm and Docker env var#165eduardofraga wants to merge 3 commits into
eduardofraga wants to merge 3 commits into
Conversation
…nv var Add support for customizing PHP memory_limit across both deployment methods: Docker: - New docker-entrypoint.sh reads PHP_MEMORY_LIMIT env var (default: 256M) and writes zz-custom.ini at container start - Updated Dockerfile.base to include entrypoint with execute permissions - Added PHP_MEMORY_LIMIT to .env.example Helm: - New phpConfig.memory_limit value in values.yaml (default: 256M) - New glpi-php-config ConfigMap rendering zz-helm-custom.ini - Mounted as volume in php-fpm Deployment, all Jobs, and CronJob - Uses zz- prefix to ensure load order after 99-glpi.ini
Add all PHP ini settings from docker/php/conf.d/99-glpi.ini as configurable values: memory_limit, file_uploads, max_execution_time, register_globals, magic_quotes_sybase, session.auto_start, session.use_trans_sid, session.cookie_httponly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ability to customize PHP
memory_limitacross both deployment methods — Docker Compose and Helm/Kubernetes — without rebuilding images.Changes
Docker
docker/php/docker-entrypoint.sh— readsPHP_MEMORY_LIMITenv var (default256M) and writeszz-custom.iniinto PHP's ini scan directory at container startdocker/php/Dockerfile.base— copies entrypoint script and setsENTRYPOINTdocker/.env.example— addedPHP_MEMORY_LIMITvariableHelm
glpi.phpfpm.phpConfig.memory_limittovalues.yaml(default256M)glpi-php-configConfigMap toglpi-configmap.yaml— renderszz-helm-custom.inifrom valuesglpi-deployment.yaml— mounts the ConfigMap as a volume in the php-fpm containerglpi-job.yaml— mounts in all 5 job types (verifyDir, dbInstall, dbUpgrade, dbConfigure, cacheConfigure)glpi-cronjob.yaml— mounts in the cronjob containerDesign Notes
zz-to ensure they load after the built-in99-glpi.ini, allowing proper overridedocker-php-entrypoint)Verification
256MPHP_MEMORY_LIMIT=512Min.env256M--set glpi.phpfpm.phpConfig.memory_limit=512Mhadolint— pass on both Dockerfileshelm lint— pass (0 failures)helm template— all resources rendered correctlydocker build—eftechcombr/glpi:basebuilt and tested successfullyPHP_MEMORY_LIMIT=512Mcorrectly overrides to512M