fix(nextcloud): use config override

This commit is contained in:
JJGadgets
2023-11-03 22:23:41 +08:00
parent a5a5319ce3
commit 6e17ddad96

View File

@@ -143,10 +143,10 @@ spec:
path: /var/www/html
readOnly: true
initContainers:
01-cp-config:
image: *ncimg
command: ["/bin/sh", "-c", "cp /nc-config/config.php /var/www/html/config/config.php; chmod 0400 /var/www/html/config/config.php"]
securityContext: *sc
# 01-cp-config:
# image: *ncimg
# command: ["/bin/sh", "-c", "cp /nc-config/config.php /var/www/html/config/config.php; chmod 0400 /var/www/html/config/config.php"]
# securityContext: *sc
02-caddy:
image:
repository: "public.ecr.aws/docker/library/caddy"
@@ -243,21 +243,23 @@ spec:
name: "nextcloud-config"
advancedMounts:
main:
01-cp-config:
- path: "/nc-config"
readOnly: true
# 01-cp-config:
# - path: "/nc-config"
# readOnly: true
main:
- path: "/nc-config"
# - path: "/nc-config"
- subPath: "config.php"
path: "/var/www/html/config/jj.config.php"
readOnly: true
# push:
# - path: "/var/www/html/config"
# readOnly: true
caddy:
enabled: true
type: configMap
name: "nextcloud-caddy"
advancedMounts:
main:
# caddy:
# enabled: true
# type: configMap
# name: "nextcloud-caddy"
# advancedMounts:
# main:
web:
- subPath: "Caddyfile"
path: "/Caddyfile"
@@ -267,14 +269,14 @@ spec:
existingClaim: "nextcloud-nas-data"
advancedMounts:
main:
01-cp-config:
- subPath: "config"
path: "/var/www/html/config"
# 01-cp-config:
# - subPath: "config"
# path: "/var/www/html/config"
main:
- subPath: "data"
path: "/ncdata"
- subPath: "config"
path: "/var/www/html/config"
# - subPath: "config"
# path: "/var/www/html/config"
tmp:
enabled: true
type: emptyDir
@@ -318,6 +320,7 @@ spec:
<?php
$CONFIG = array (
'config_is_read_only' => true,
'installed' => true,
'instanceid' => getenv('NC_INSTANCEID'),
'passwordsalt' => getenv('NC_PASSWORDSALT'),
'secret' => getenv('NC_SECRET'),
@@ -380,9 +383,9 @@ spec:
# 'port' => 0,
# ),
# );
caddy:
enabled: true
data:
# caddy:
# enabled: true
# data:
Caddyfile: |
{
http_port 8080