Use init container

This commit is contained in:
Micke Nordin 2023-04-03 13:03:38 +02:00
parent 3357192b5d
commit 336cef0540
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -37,12 +37,6 @@ spec:
- name: default-config
mountPath: /etc/apache2/sites-enabled/000-default.conf
subPath: 000-default.conf
- name: apache-php-config
mountPath: /etc/php/8.0/apache2/php.ini
subPath: php.ini
- name: apcu-php-config
mountPath: /etc/php/8.0/mods-available/apcu.ini
subPath: apcu.ini
- name: hugepage
mountPath: /dev/hugepages
- name: nc-upgrade
@ -70,7 +64,7 @@ spec:
- containerPort: 80
name: nextcloud-http
command: ["/bin/bash"]
args: ["-c", "apachectl -D FOREGROUND"]
args: ["-c", "mv /var/www/html/config/apcu.ini /etc/php/8.0/mods-available/ && mv /var/www/html/config/apache-php.ini /etc/php/8.0/apache2 && mv /var/www/html/config/cli-php.ini /etc/php/8.0/cli/ && apachectl -D FOREGROUND"]
lifecycle:
postStart:
exec:
@ -85,6 +79,15 @@ spec:
- name: nextcloud-data
mountPath: /var/www/html/config
subPath: config
- name: apache-php-config
mountPath: /tmp/apache2-php.ini
subPath: php.ini
- name: apcu-php-config
mountPath: /tmp/apcu.ini
subPath: apcu.ini
- name: cli-php-config
mountPath: /tmp/cli-php.ini
subPath: php.ini
env:
- name: GSS_MASTER_URL
value: "https://drive.test.sunet.se"
@ -173,7 +176,7 @@ spec:
value: "redis"
- name: SITE_NAME
value: "customer.drive.test.sunet.se"
command: ["/bin/bash", "-c", "/usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"]
command: ["/bin/bash", "-c", "cp /tmp/*.ini /var/www/html/config && /usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"]
volumes:
- name: nextcloud-config-template
configMap: