This commit is contained in:
2024-05-17 08:33:33 +02:00
parent 9b516d4470
commit 50b7296415
4 changed files with 73 additions and 4 deletions

View File

@@ -46,6 +46,33 @@ resource "kubectl_manifest" "Deployment_wordpress" {
- mountPath: /wordpress-data/wp-content/
name: wordpress-data
subPath: wp-content
- name: wordpress-config
image: ${var.images.wordpress.registry}/${var.images.wordpress.repository}:${var.images.wordpress.tag}
imagePullPolicy: ${var.images.wordpress.pull_policy}
command: [/usr/local/bin/vynil-configurator]
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
envFrom:
- configMapRef:
name: "${kubectl_manifest.wordpress_cfg.name}"
- secretRef:
name: "${kubectl_manifest.secret.name}"
volumeMounts:
- mountPath: /var/www/html/
name: wordpress-app
- name: wordpress-data
mountPath: /var/www/html/wp-content/
subPath: wp-content
- name: wordpress-scripts
mountPath: /usr/local/bin/wp
subPath: wp-cli
- name: wordpress-scripts
mountPath: /usr/local/bin/vynil-configurator
subPath: "vynil-configurator.sh"
containers:
- name: wordpress
image: ${var.images.wordpress.registry}/${var.images.wordpress.repository}:${var.images.wordpress.tag}
@@ -101,10 +128,10 @@ resource "kubectl_manifest" "Deployment_wordpress" {
- name: wordpress-config
mountPath: /usr/local/etc/php/conf.d/opcache-recommended.ini
subPath: php-opcache-recommended.ini
- name: wordpress-config
mountPath: /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
subPath: docker-php-ext-redis.ini
- name: wordpress-config
# - name: wordpress-config
# mountPath: /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
# subPath: docker-php-ext-redis.ini
- name: wordpress-scripts
mountPath: /usr/local/bin/wp
subPath: wp-cli
- name: nginx
@@ -154,6 +181,15 @@ resource "kubectl_manifest" "Deployment_wordpress" {
volumes:
- name: wordpress-app
emptyDir: {}
- name: wordpress-scripts
configMap:
defaultMode: 0755
name: ${kubectl_manifest.wordpress_files.name}
items:
- key: "vynil-configurator.sh"
path: "vynil-configurator.sh"
- key: "wp-cli"
path: "wp-cli"
- name: wordpress-config
configMap:
name: ${kubectl_manifest.wordpress_files.name}