nextcloud config from configmap

This commit is contained in:
2021-08-20 11:45:44 +02:00
parent 455f519fca
commit 8fc6757dbd
4 changed files with 56 additions and 53 deletions

View File

@@ -15,7 +15,7 @@ RUN apt-get clean -y && \
RUN touch /usr/src/nextcloud/data/.ocdata RUN touch /usr/src/nextcloud/data/.ocdata
COPY config.php /usr/src/nextcloud/config/ COPY config.php /usr/src/nextcloud/config/
#COPY htaccess-data /usr/src/nextcloud/data/.htaccess #COPY htaccess-data /usr/src/nextcloud/data/.htaccess
COPY apache-default-vhost.conf /etc/apache2/sites-available/000-default.conf #COPY apache-default-vhost.conf /etc/apache2/sites-available/000-default.conf
RUN mv /usr/src/nextcloud/.htaccess /usr/src/nextcloud/.htaccess.bak RUN mv /usr/src/nextcloud/.htaccess /usr/src/nextcloud/.htaccess.bak
RUN mv /usr/src/nextcloud/config/.htaccess /usr/src/nextcloud/config/.htaccess.bak RUN mv /usr/src/nextcloud/config/.htaccess /usr/src/nextcloud/config/.htaccess.bak

2
apps/nextcloud/README.md Normal file
View File

@@ -0,0 +1,2 @@
# kubectl -n live-env create configmap nextcloud-config --from-file=config.php
# kubectl -n live-env create configmap nextcloud-nginx-site --from-file=nginx-site.configmap.conf

View File

@@ -5,26 +5,21 @@
$CONFIG = array( $CONFIG = array(
'htaccess.RewriteBase' => '/', 'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu', 'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' => 'apps_paths' => array(
array ( 0 => array(
0 =>
array (
'path' => '/var/www/html/apps', 'path' => '/var/www/html/apps',
'url' => '/apps', 'url' => '/apps',
'writable' => false, 'writable' => false
), ),
1 => 1 => array(
array (
'path' => '/var/www/html/custom_apps', 'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps', 'url' => '/custom_apps',
'writable' => true, 'writable' => true
)
), ),
), 'objectstore' => array(
'objectstore' =>
array (
'class' => '\\OC\\Files\\ObjectStore\\S3', 'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => 'arguments' => array(
array (
'bucket' => 'nextcloud', 'bucket' => 'nextcloud',
'key' => 'nextcloud', 'key' => 'nextcloud',
'secret' => 'tWnc3zdxcDUvcX5f9uY7RRYvKLcWI1KY', 'secret' => 'tWnc3zdxcDUvcX5f9uY7RRYvKLcWI1KY',
@@ -35,15 +30,14 @@ $CONFIG = array (
'autocreate' => false, 'autocreate' => false,
'use_ssl' => true, 'use_ssl' => true,
'use_path_style' => true, 'use_path_style' => true,
'legacy_auth' => false, 'legacy_auth' => false
), )
), ),
'instanceid' => 'ocsxqijfvpf7', 'instanceid' => 'ocsxqijfvpf7',
'passwordsalt' => 'OTjmXJP0VKlw+OLja6wUxbHlZk4Txw', 'passwordsalt' => 'OTjmXJP0VKlw+OLja6wUxbHlZk4Txw',
'secret' => '0g94SdF7A2k/LHTKUM+8HwEDFgF1zz7I/sMauap02/d8G677', 'secret' => '0g94SdF7A2k/LHTKUM+8HwEDFgF1zz7I/sMauap02/d8G677',
'trusted_domains' => 'trusted_domains' => array(
array ( 0 => 'nc.lan'
0 => 'nc.lan',
), ),
'datadirectory' => '/var/www/html/data', 'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql', 'dbtype' => 'pgsql',
@@ -56,4 +50,5 @@ $CONFIG = array (
'dbuser' => 'nextcloud', 'dbuser' => 'nextcloud',
'dbpassword' => 'Vb7yHzmE5HIjfU4hf89aXAmEEmxAnMdB', 'dbpassword' => 'Vb7yHzmE5HIjfU4hf89aXAmEEmxAnMdB',
'installed' => true, 'installed' => true,
'default_phone_region' => 'DE'
); );

View File

@@ -25,6 +25,9 @@ spec:
- name: nextcloud-nginx-site - name: nextcloud-nginx-site
configMap: configMap:
name: nextcloud-nginx-site name: nextcloud-nginx-site
- name: nextcloud-config
configMap:
name: nextcloud-config
- name: www-data - name: www-data
emptyDir: {} emptyDir: {}
containers: containers:
@@ -49,6 +52,9 @@ spec:
volumeMounts: volumeMounts:
- name: www-data - name: www-data
mountPath: /var/www/html mountPath: /var/www/html
- name: nextcloud-config
mountPath: /var/www/html/config/config.php
subPath: config.php
env: env:
- name: TZ - name: TZ
value: "Europe/Berlin" value: "Europe/Berlin"