Skip to content

Commit

Permalink
Update Kustomize resources to use php-config.ini ConfigMap value.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropable committed Dec 11, 2024
1 parent 15d0f3d commit afb520f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Use the included Compose file to start the required services to serve the projec
Prerequisites:

1. Docker image is built (see above).
1. A local `ports.conf` and `default.conf` should be generated to configure Apache within
the running container (examples are in the `kustomize\overlays` directory). These
files will be bind-mounted in the container.
1. Local `ports.conf`, `default.conf` and `php-config.ini` files should be generated to
configure Apache within the running container (examples are in the `kustomize\overlays`
directory). These files will be bind-mounted in the container.
1. A local `settings.php` should be generated containing site configuration that will be
bind-mounted at `web/sites/default/settings.php`.
1. Local `.env.mysql` and `.env.flatbacks` files should be created, containing secrets.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- "${PWD}/default.conf:/etc/apache2/sites-enabled/000-default.conf:ro"
- "flatbacks_files:/opt/drupal/web/sites/default/files"
- "${PWD}/settings.php:/opt/drupal/web/sites/default/settings.php:ro"
- "${PWD}/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini:ro"
redis:
image: "redis:7.2-alpine"
ports:
Expand Down
4 changes: 4 additions & 0 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ spec:
name: flatbacks-configmap
readOnly: true
subPath: settings.php
- mountPath: /usr/local/etc/php/conf.d/php-config.ini
name: flatbacks-configmap
readOnly: true
subPath: php-config.ini
- mountPath: /opt/drupal/web/sites/default/files
name: flatbacks-files
volumes:
Expand Down
1 change: 1 addition & 0 deletions kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ configMapGenerator:
- default.conf
- ports.conf
- settings.php
- php-config.ini
generatorOptions:
disableNameSuffixHash: true
labels:
Expand Down
9 changes: 9 additions & 0 deletions kustomize/overlays/prod/php-config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zend.exception_ignore_args=On
zend.exception_string_param_max_len=0
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors=stderr
display_startup_errors=Off
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics=Off
zend.assertions = -1
output_buffering=4096
4 changes: 4 additions & 0 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
name: flatbacks-configmap
readOnly: true
subPath: settings.php
- mountPath: /usr/local/etc/php/conf.d/php-config.ini
name: flatbacks-configmap
readOnly: true
subPath: php-config.ini
- mountPath: /opt/drupal/web/sites/default/files
name: flatbacks-files
volumes:
Expand Down
1 change: 1 addition & 0 deletions kustomize/overlays/uat/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ configMapGenerator:
- default.conf
- ports.conf
- settings.php
- php-config.ini
generatorOptions:
disableNameSuffixHash: true
labels:
Expand Down
9 changes: 9 additions & 0 deletions kustomize/overlays/uat/php-config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zend.exception_ignore_args=On
zend.exception_string_param_max_len=0
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors=stderr
display_startup_errors=Off
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics=Off
zend.assertions = -1
output_buffering=4096

0 comments on commit afb520f

Please sign in to comment.