YunoHost-Apps / discourse_ynh

Discourse package for YunoHost
https://www.discourse.org/
GNU General Public License v2.0
24 stars 12 forks source link

Upgrade #112

Closed yalh76 closed 2 years ago

yalh76 commented 2 years ago

Problem

Solution

PR Status

Automatic tests

Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

artybdrlt commented 2 years ago

Hello,

Thank you for this quick fix. We tried it but it doesn't fix the problem. In our case installing discourse on forum.domain.tld without a path, we still have a / in line relative_url_root (in config/discourse.conf). However, this causes problems for discourse.

The problem seems to have arisen because of the change of the installation method since this commit.

The way you used to install and configure an hostname for Discourse worked as intended (with the file scripts/install)

By doing various tests today, and by reading the scripts (and YunoHost helper scripts), we think we have found the origin of the problem.

We have the following variables:

path_url="/"
domain="forum.domain.tld"

The helper function ynh_add_config will replace in the template the variables using the function ynh_replace_vars.

In this function there are two paterns:

What do you think about that?