mirror of
https://github.com/bitnami/charts.git
synced 2026-02-13 06:27:12 +08:00
[bitnami/wordpress] Enable using the bitnami/wordpress container custom user post-init.d scripts (#4373)
* Added Custom post-init scripts configmap to wordpress helm chart * Corrected variable name in example * Bump wordpress chart version * Remove empty spaces * Add newline at the end of values.yaml * Bumped minor chart version * Added more explicit empty map as default value to customPostInitScripts * Added same default values to values-production.yaml * Shortened configmap name and swapped templating function that populates data field * Added newline at the end of values.production.yaml * Update values-production.yaml Co-authored-by: Bogdan Peste <Bogdan.Peste@ibm.com> Co-authored-by: Miguel Ángel Cabrera Miñagorri <devgorri@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: wordpress
|
||||
version: 9.9.3
|
||||
version: 9.10.0
|
||||
appVersion: 5.5.3
|
||||
description: Web publishing platform for building blogs and websites.
|
||||
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
|
||||
|
||||
8
bitnami/wordpress/templates/configmap.yaml
Normal file
8
bitnami/wordpress/templates/configmap.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
{{- if .Values.customPostInitScripts }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "wordpress.fullname" . }}-postinit
|
||||
data:
|
||||
{{- include "wordpress.tplValue" ( dict "value" .Values.customPostInitScripts "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
@@ -576,3 +576,23 @@ sidecars: {}
|
||||
## command: ['sh', '-c', 'copy themes and plugins from git and push to /bitnami/wordpress/wp-content. Should work with extraVolumeMounts and extraVolumes']
|
||||
##
|
||||
initContainers: {}
|
||||
|
||||
## Make use of custom post-init.d user scripts functionality inside the bitnami/wordpress image
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress/tree/master/5/debian-10/rootfs/post-init.d
|
||||
##
|
||||
## The logic of the post-init.d user scripts is that all is all files with extensions .sh, .sql or .php are executed for one time only, at the very first initialization of the pod as the very last step of entrypoint.sh.
|
||||
## Example:
|
||||
## customPostInitScripts:
|
||||
## enable-multisite.sh: |
|
||||
## #!/bin/bash
|
||||
## chmod +w /bitnami/wordpress/wp-config.php
|
||||
## wp core multisite-install --url=example.com --title="Welcome to the WordPress Multisite" --admin_user="doesntmatternotreallyused" --admin_password="doesntmatternotreallyused" --admin_email="user@example.com"
|
||||
## cat /docker-entrypoint-init.d/.htaccess > /bitnami/wordpress/.htaccess
|
||||
## chmod -w bitnami/wordpress/wp-config.php
|
||||
## .htaccess: |
|
||||
## RewriteEngine On
|
||||
## RewriteBase /
|
||||
## ...
|
||||
##
|
||||
## NOTE: Combined with extraVolume and extraVolumeMounts to mount the configmap to /docker-entrypoint-init.d where custom user init scripts are looked for
|
||||
customPostInitScripts: {}
|
||||
|
||||
@@ -570,3 +570,23 @@ sidecars: {}
|
||||
## command: ['sh', '-c', 'copy themes and plugins from git and push to /bitnami/wordpress/wp-content. Should work with extraVolumeMounts and extraVolumes']
|
||||
##
|
||||
initContainers: {}
|
||||
|
||||
## Make use of custom post-init.d user scripts functionality inside the bitnami/wordpress image
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress/tree/master/5/debian-10/rootfs/post-init.d
|
||||
##
|
||||
## The logic of the post-init.d user scripts is that all is all files with extensions .sh, .sql or .php are executed for one time only, at the very first initialization of the pod as the very last step of entrypoint.sh.
|
||||
## Example:
|
||||
## customPostInitScripts:
|
||||
## enable-multisite.sh: |
|
||||
## #!/bin/bash
|
||||
## chmod +w /bitnami/wordpress/wp-config.php
|
||||
## wp core multisite-install --url=example.com --title="Welcome to the WordPress Multisite" --admin_user="doesntmatternotreallyused" --admin_password="doesntmatternotreallyused" --admin_email="user@example.com"
|
||||
## cat /docker-entrypoint-init.d/.htaccess > /bitnami/wordpress/.htaccess
|
||||
## chmod -w bitnami/wordpress/wp-config.php
|
||||
## .htaccess: |
|
||||
## RewriteEngine On
|
||||
## RewriteBase /
|
||||
## ...
|
||||
##
|
||||
## NOTE: Combined with extraVolume and extraVolumeMounts to mount the configmap to /docker-entrypoint-init.d where custom user init scripts are looked for
|
||||
customPostInitScripts: {}
|
||||
|
||||
Reference in New Issue
Block a user