Skip to content

Commit

Permalink
helm: allow to set default quota for Nextcloud
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed May 28, 2024
1 parent 524d97b commit 3c6b44d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Containers/nextcloud/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ if [ -n "$SUBSCRIPTION_KEY" ] && [ -z "$(php /var/www/html/occ config:app:get su
php /var/www/html/occ config:app:set support potential_subscription_key --value="$SUBSCRIPTION_KEY"
php /var/www/html/occ config:app:delete support last_check
fi
if [ -n "$NEXTCLOUD_DEFAULT_QUOTA" ]; then
if [ "$NEXTCLOUD_DEFAULT_QUOTA" = "unlimited" ]; then
php /var/www/html/occ config:app:delete files default_quota
else
php /var/www/html/occ config:app:set files default_quota --value="$NEXTCLOUD_DEFAULT_QUOTA"
fi
fi

# Adjusting log files to be stored on a volume
echo "Adjusting log files..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ spec:
value: "{{ .Values.ADDITIONAL_TRUSTED_DOMAIN }}"
- name: SERVERINFO_TOKEN
value: "{{ .Values.SERVERINFO_TOKEN }}"
- name: NEXTCLOUD_DEFAULT_QUOTA
value: "{{ .Values.NEXTCLOUD_DEFAULT_QUOTA }}"
- name: ADDITIONAL_APKS
value: "{{ .Values.NEXTCLOUD_ADDITIONAL_APKS }}"
- name: ADDITIONAL_PHP_EXTENSIONS
Expand Down
3 changes: 3 additions & 0 deletions nextcloud-aio-helm-chart/update-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ cat << EOL > /tmp/additional.config
value: "{{ .Values.ADDITIONAL_TRUSTED_DOMAIN }}"
- name: SERVERINFO_TOKEN
value: "{{ .Values.SERVERINFO_TOKEN }}"
- name: NEXTCLOUD_DEFAULT_QUOTA
value: "{{ .Values.NEXTCLOUD_DEFAULT_QUOTA }}"
EOL
# shellcheck disable=SC1083
find ./ -name '*nextcloud-deployment.yaml' -exec sed -i "/^.*\- env:/r /tmp/additional.config" \{} \;
Expand Down Expand Up @@ -358,6 +360,7 @@ SERVERINFO_TOKEN: # This allows to set the serverinfo app token for monit
APPS_ALLOWLIST: # This allows to configure allowed apps that will be shown in Nextcloud's Appstore. You need to enter the app-IDs of the apps here and separate them with spaces. E.g. 'files richdocuments'
ADDITIONAL_TRUSTED_PROXY: # Allows to add one additional ip-address to Nextcloud's trusted proxies and to the Office WOPI-allowlist automatically. Set it e.g. like this: 'your.public.ip-address'. You can also use an ip-range here.
ADDITIONAL_TRUSTED_DOMAIN: # Allows to add one domain to Nextcloud's trusted domains and also generates a certificate automatically for it
NEXTCLOUD_DEFAULT_QUOTA: "10 GB" # Allows to adjust the default quota that will be taken into account in Nextcloud for new users. Setting it to "unlimited" will set it to unlimited
SMTP_HOST: # (empty by default): The hostname of the SMTP server.
SMTP_SECURE: # (empty by default): Set to 'ssl' to use SSL, or 'tls' to use STARTTLS.
SMTP_PORT: # (default: '465' for SSL and '25' for non-secure connections): Optional port for the SMTP connection. Use '587' for an alternative port for STARTTLS.
Expand Down
1 change: 1 addition & 0 deletions nextcloud-aio-helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ SERVERINFO_TOKEN: # This allows to set the serverinfo app token for monit
APPS_ALLOWLIST: # This allows to configure allowed apps that will be shown in Nextcloud's Appstore. You need to enter the app-IDs of the apps here and separate them with spaces. E.g. 'files richdocuments'
ADDITIONAL_TRUSTED_PROXY: # Allows to add one additional ip-address to Nextcloud's trusted proxies and to the Office WOPI-allowlist automatically. Set it e.g. like this: 'your.public.ip-address'. You can also use an ip-range here.
ADDITIONAL_TRUSTED_DOMAIN: # Allows to add one domain to Nextcloud's trusted domains and also generates a certificate automatically for it
NEXTCLOUD_DEFAULT_QUOTA: "10 GB" # Allows to adjust the default quota that will be taken into account in Nextcloud for new users. Setting it to "unlimited" will set it to unlimited
SMTP_HOST: # (empty by default): The hostname of the SMTP server.
SMTP_SECURE: # (empty by default): Set to 'ssl' to use SSL, or 'tls' to use STARTTLS.
SMTP_PORT: # (default: '465' for SSL and '25' for non-secure connections): Optional port for the SMTP connection. Use '587' for an alternative port for STARTTLS.
Expand Down

0 comments on commit 3c6b44d

Please sign in to comment.