Installing docker-discourse folder in /var/discourse

Hello everyone,

The docker installation suggests to install discourse in the /var/discourse folder. In our server, we use Docker containerization technology to isolation application, and have a workspace folder in the home directory into which each app goes in with its docker container. I am wondering here as to what is the necessity as to install discourse in /var/discourse ? Could it also be installed in ~/workspace/discourse ?

1 Like

It would be theoretically be possible for you to install Discourse in such a manner however I would not recommend it as there are multiple hard coded paths in the code where the software depends upon Discourse code being installed in /var/discourse. This could easily be solved by running a fork though however you may fall behind with updates.

Disclaimer: I am speaking for myself only and not on behalf of the people who develop the software. If you are a member of the Discourse team feel free to clarify or rebuff my point if needed.

Hmm I don’t think that is true, your search is hitting a lot of barely related stuff.

That said I do recommend following the standard path convention unless you have compelling reasons not to.

After setting up your site details, adjust the paths for the volumes in the app.yml. That should be enough.

4 Likes

Thank you for the information.
So I understand that it is not impossible to do so. So the only changes that takes place is that after running ./discourse-setup, I need to change the paths for volumes in the generated app.yml file. Is this correct?
Doesn’t the setup tool make any assumptions that the installation is taking place in /var/discourse ? If yes, where do I have to make to those changes?
Again thank you so much for your time.

1 Like

The setup tool mostly fills the app.yml for you, so all you need is fixing the paths on that file afterwards.

1 Like

Thanks for letting know. I’ll try that out and get back in case of any issues regarding that! Thanks again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.