Skip to content

Commit

Permalink
Merge branch 'main' into renovate/wordpress-6.6.2-php8.2-fpm-alpine
Browse files Browse the repository at this point in the history
Signed-off-by: ffais <[email protected]>
  • Loading branch information
ffais committed Oct 16, 2024
2 parents 52a99d4 + 56c98ee commit f097c9a
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 236 deletions.
8 changes: 0 additions & 8 deletions dockerfiles/php-fpm-healtcheck-Dockerfile

This file was deleted.

139 changes: 0 additions & 139 deletions dockerfiles/php-fpm-healthcheck

This file was deleted.

15 changes: 0 additions & 15 deletions dockerfiles/php-fpm-redis-Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion wordpress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies:
repository: oci://registry-1.docker.io/bitnamicharts
condition: mariadb.enabled
- name: redis
version: "20.2.0"
version: "20.2.1"
repository: oci://registry-1.docker.io/bitnamicharts
condition: redis.enabled
2 changes: 1 addition & 1 deletion wordpress/confs/mariadb-init-script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
mysql -P 3306 -uroot -p${MARIADB_ROOT_PASSWORD} -e "CREATE DATABASE ${WORDPRESS_DB_NAME}";
mysql -P 3306 -uroot -p${MARIADB_ROOT_PASSWORD} -e "CREATE USER '${WORDPRESS_DB_USER}'@'%' IDENTIFIED BY '${WORDPRESS_DB_PASSWORD}'";
mysql -P 3306 -uroot -p${MARIADB_ROOT_PASSWORD} -e "GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON ${WORDPRESS_DB_NAME}.* TO '${WORDPRESS_DB_USER}'@'%';";
mysql -P 3306 -uroot -p${MARIADB_ROOT_PASSWORD} -e "GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,CREATE TEMPORARY TABLES,INDEX,LOCK TABLES ON ${WORDPRESS_DB_NAME}.* TO '${WORDPRESS_DB_USER}'@'%';";
1 change: 1 addition & 0 deletions wordpress/confs/wordpress/init-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ echo "Check if wordpress is installed"
if ! wp core is-installed 2>/dev/null; then
echo "WP is not installed. Let's try installing it."
wp core install --url="$wpUrl" --title="$wpTitle" --admin_user="$wpAdminUsername" --admin_email="$wpAdminEmail" --skip-email --admin_password="$wpAdminPassword" --path=/var/www/html/
wp rewrite structure '/%postname%'
fi
13 changes: 12 additions & 1 deletion wordpress/templates/nginx-configurations-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
data:
wordpress.conf: |
server {
listen 8080 default_server;
listen 8080 default_server http2;
server_name localhost;
Expand All @@ -16,6 +16,17 @@ data:
client_max_body_size {{ .Values.nginx.confsOverride.maxBodySize }};
fastcgi_buffers 64 4K;
location ~ /\.ht {
deny all;
return 403;
}
## disable all access to the following directories
location ~ ^/(config|tmp|core|lang) {
deny all;
return 404; # replace with 404 to not show these directories exist
}
gzip on;
gzip_vary on;
gzip_comp_level 4;
Expand Down
8 changes: 6 additions & 2 deletions wordpress/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ spec:
- name: http
containerPort: {{ .Values.nginx.service.port }}
protocol: TCP
{{- with .Values.nginx.livenessProbe }}
livenessProbe:
{{- toYaml .Values.nginx.livenessProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nginx.readinessProbe }}
readinessProbe:
{{- toYaml .Values.nginx.readinessProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.nginx.resources | nindent 12 }}
{{- if or .Values.persistence.enabled .Values.nginx.volumeMounts }}
Expand Down
14 changes: 11 additions & 3 deletions wordpress/templates/php-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
value: {{ print "tcp://127.0.0.1:9000" .Values.php.poolConfigOverride.pmStatusPath | quote }}
- name: PHP_FPM_WEB_LISTEN_ADDRESS
value: "0.0.0.0:9253"
- name: PHP_FPM_FIX_PROCESS_COUNT
value: "true"
resources:
{{- toYaml .Values.php.exporter.resources | nindent 12 }}
ports:
Expand Down Expand Up @@ -74,12 +76,18 @@ spec:
- name: fastcgi
containerPort: {{ .Values.php.service.port }}
protocol: TCP
{{- with .Values.php.startupProbe }}
startupProbe:
{{- toYaml .Values.php.startupProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.php.livenessProbe }}
livenessProbe:
{{- toYaml .Values.php.livenessProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.php.readinessProbe }}
readinessProbe:
{{- toYaml .Values.php.readinessProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.php.resources | nindent 12 }}
{{- if or .Values.persistence.enabled .Values.php.volumeMounts }}
Expand Down
2 changes: 1 addition & 1 deletion wordpress/templates/wordpress-backup-azure-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
value: /tmp/plan
envFrom:
- secretRef:
name: {{ .Release.Name }}-azure-creds
name: {{ .Values.jobs.backup.azure.existingSecret }}
- configMapRef:
name: {{ .Release.Name }}-wordpress-vars
resources:
Expand Down
Loading

0 comments on commit f097c9a

Please sign in to comment.