You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should support configuring the database port for external databases. When I looked further, it doesn't look like port is included here in values.yaml:
Read possible drawbacks for why this is titled with maybe haha
Benefits
For both MariaDB/PostgreSQL, you can set the database ports:
For mariadb, you'd want mariadb.primary.containerPorts.mysql.
For postgresql, you'd want postgresql.containerPorts.postgresql
I didn't have time to look into nextcloud/server and see if this has been brought up, but changing the default postgresql/mysql port is often a security through obscurity tactic, to avoid script kiddies finding your server (if it is public for some reason), so it seems like a common request...
So it looks like we don't need to do anything as in nextcloud/docker#2300 josh pointed out that you can specify port as part of the database host like if the custom port is 1234 the dbhost can be set to hostname:1234 as documented here. I think the only thing needed for this ticket would be to just put this into our README.md and maybe a comment in the values.yaml, but other than that, seems fine to me :)
Description of the change
We should support configuring the database port for external databases. When I looked further, it doesn't look like port is included here in
values.yaml
:helm/charts/nextcloud/values.yaml
Lines 354 to 382 in 0565cdb
we'd need to also update
_helpers.tpl
:helm/charts/nextcloud/templates/_helpers.tpl
Lines 75 to 169 in 0565cdb
Would also need to update
deployment.tpl
(both for the is_ready initContainer and the main nextcloud container):helm/charts/nextcloud/templates/deployment.yaml
Lines 295 to 336 in 0565cdb
Finally, and this is the most interesting part, we'd need to update
autoconfig.php.tpl
:https://github.com/nextcloud/helm/blob/0565cdba9843040bc7e2641b8ac6955d2feba9ae/charts/nextcloud/files/defaultConfigs/autoconfig.php.tpl
Read possible drawbacks for why this is titled with maybe haha
Benefits
For both MariaDB/PostgreSQL, you can set the database ports:
For mariadb, you'd want
mariadb.primary.containerPorts.mysql
.For postgresql, you'd want
postgresql.containerPorts.postgresql
Possible drawbacks
If we update
autoconfig.php.tpl
, we should also update that in nextcloud/docker:https://github.com/nextcloud/docker/blob/master/.config/autoconfig.php
But then I realized... is this even supported in nextcloud/server?
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html
I see mysql port briefly mentioned in the php section here:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html#configuring-a-mysql-or-mariadb-database
I didn't have time to look into nextcloud/server and see if this has been brought up, but changing the default postgresql/mysql port is often a security through obscurity tactic, to avoid script kiddies finding your server (if it is public for some reason), so it seems like a common request...
Additional information
This was originally brought up in #618.
Started the discussion in nextcloud/docker here: nextcloud/docker#2300
The text was updated successfully, but these errors were encountered: