fix nextcloud
This commit is contained in:
@@ -71,7 +71,7 @@ in {
|
|||||||
|
|
||||||
setup = {
|
setup = {
|
||||||
trigger = "server";
|
trigger = "server";
|
||||||
envFile = config.sops.secrets."CUSTOM".path;
|
envFile = [config.sops.secrets."CUSTOM".path config.sops.secrets."NEXTCLOUD".path ];
|
||||||
script = pkgs.writeShellScript "setup" ''
|
script = pkgs.writeShellScript "setup" ''
|
||||||
# Define the command wrapper
|
# Define the command wrapper
|
||||||
OCC="${pkgs.podman}/bin/podman --events-backend=none exec --env-file ${config.sops.secrets."CUSTOM".path} -e DOMAIN=${serverCfg.domain} -u www-data nextcloud-server php occ"
|
OCC="${pkgs.podman}/bin/podman --events-backend=none exec --env-file ${config.sops.secrets."CUSTOM".path} -e DOMAIN=${serverCfg.domain} -u www-data nextcloud-server php occ"
|
||||||
@@ -87,12 +87,27 @@ in {
|
|||||||
|
|
||||||
$OCC maintenance:install \
|
$OCC maintenance:install \
|
||||||
--admin-user "$DEFAULT_ADMIN_USERNAME" \
|
--admin-user "$DEFAULT_ADMIN_USERNAME" \
|
||||||
--admin-pass "$DEFAULT_ADMIN_PASSWORD"
|
--admin-pass "$DEFAULT_ADMIN_PASSWORD" \
|
||||||
|
--database "pgsql" \
|
||||||
|
--database-host "${builder.host}" \
|
||||||
|
--database-name "nextcloud_db" \
|
||||||
|
--database-user "nextcloud_user" \
|
||||||
|
--database-pass "$POSTGRES_PASSWORD" \
|
||||||
|
--data-dir "/var/www/html/data"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
#if [ -z "$INSTALLED" ] || [ -f "/tmp/force-nextcloud-setup" ]; then
|
|
||||||
# rm -f "/tmp/force-nextcloud-setup"
|
echo "Applying Settings..."
|
||||||
echo "Applying Settings..."
|
|
||||||
|
$OCC config:system:set dbhost --value="${builder.host}"
|
||||||
|
$OCC config:system:set dbuser --value="nextcloud_user"
|
||||||
|
$OCC config:system:set dbpassword --value="$POSTGRES_PASSWORD"
|
||||||
|
$OCC config:system:set dbname --value="nextcloud_db"
|
||||||
|
$OCC config:system:set memcache.local --value="\OC\Memcache\Redis"
|
||||||
|
$OCC config:system:set memcache.locking --value="\OC\Memcache\Redis"
|
||||||
|
$OCC config:system:set redis --value='{"host":"${builder.host}", "port":6379, "timeout":0.0}' --type=value
|
||||||
$OCC config:system:set trusted_domains 1 --value=${containerCfg.subdomain}.${serverCfg.domain}
|
$OCC config:system:set trusted_domains 1 --value=${containerCfg.subdomain}.${serverCfg.domain}
|
||||||
$OCC config:system:set default_phone_region --value="CH"
|
$OCC config:system:set default_phone_region --value="CH"
|
||||||
$OCC config:system:set overwriteprotocol --value="https"
|
$OCC config:system:set overwriteprotocol --value="https"
|
||||||
|
|||||||
Reference in New Issue
Block a user