Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"just run-tags adjust-nextcloud-config" should probably also update trusted_domains #131

Open
brush opened this issue Dec 19, 2023 · 1 comment

Comments

@brush
Copy link
Contributor

brush commented Dec 19, 2023

to reproduce:

create mash-nextcloud for testing using a temporary url.

then change the url and run just setup-all again, and then run just run-tags adjust-nextcloud-config

in config/config.php, trusted_domains still points to the old url, and throws an error.

workaround:

  • docker cp mash-nextcloud-server:/var/www/html/config/config.php .
  • vi config.php
  • change the domain
  • docker cp config.php mash-nextcloud-server:/var/www/html/config/config.php
  • however, now has the wrong user
  • enter the docker container as root. note that this is tricky as apparently you can't just use -u root for some reason (this root does not have superuser privs)
  • instead, use
    • docker inspect --format {{.State.Pid}} mash-nextcloud-server
    • then sudo nsenter --target {pid of process} --mount --uts --ipc --net --pid
    • then use ls -al and chown to fix owner of config/config.php
@spantaleev
Copy link
Member

Why are you going through hell to copy the config.php file out of the container, when it already lives on your filesystem at /mash/nextcloud/data/config/config.php.

This directory is mounted from the host into the container. The file is created by Nextcloud itself (the first time it starts), but later lives outside, on the filesystem. You can edit the file there.

Otherwise, you're probably right: the playbook's adjust-nextcloud-config tag could adjust trusted_domains. However, this value seems to be an array of strings, so adding support for it next to the others may require some changes:

https://github.com/mother-of-all-self-hosting/ansible-role-nextcloud/blob/65e75bbbd45527592360bec2f2627ce1917fdb71/defaults/main.yml#L316-L331

The actual setting happens here:

https://github.com/mother-of-all-self-hosting/ansible-role-nextcloud/blob/65e75bbbd45527592360bec2f2627ce1917fdb71/tasks/adjust_config.yml#L26-L30


If you come up with a way to do it correctly, feel free to send a PR to the ansible-role-nextcloud role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants