Discourse installation support for Podman

Hi,

Since Fedora is using Discourse, would it maybe be a good idea to start a community effort to get it working out of the box on a Podman machine? With that I mean that the default setup of the Discourse installation steps at the moment mainly target Ubuntu LTS with Docker.

I managed to get the container build done with their installation scripts, but after that I didn’t really knew how to change the command arguments to start the container the right way. I think if the folks that manage this instance (which I guess is not running Ubuntu LTS) document the steps they take to customize the install scripts of Discourse and publish that we would already go a long way.

Even better would be to add some code to the Discourse installation scripts to make it intelligent enough to also work for Podman. I noticed that most already works when podman-docker is installed and some image references in the scripts are changed and network/storage driver checks are customized.

Or if you could please share what Podman command line arguments you (or other people) use to start the Discourse container publicly on the web, then I might tinker around with the scripts and work out something with the Discourse upstream people.

2 Likes

Hello @keesdejong,
Welcome to the discussion area. Podman, generally, can use all docker commands without any difference except it is done rootless. So if you create the container using a docker file, this can also be used by Podman or Buildah to create the container too. Here’s some reading https://developers.redhat.com/blog/2019/01/15/podman-managing-containers-pods/
and here http://docs.podman.io/en/latest/Introduction.html

Exactly my thinking! However, Discourse created a non-portable Frankenstein solution. It doesn’t work with Podman out of the box and insists on running everything as root.

So that’s why I was thinking, the Fedora people must’ve made it possible to get this to work the right way. I am/was hoping that this information might get documented publicly or merged with the upstream scripts of Discourse.

Hello @keesdejong and Welcome. Fedora has its own container repo here

But unfortunately it does not have a Discourse container image yet that I could find in search. It should be possible to work with some community members to get one created and added there.

I am not sure about how well/long these Fedora images are maintained. I know that Ubuntu just announced that they are creating a container registry what will be supported as an LTS.

It’s actually the case that we’re using the hosted service provided by https://www.discourse.org/, and as such they probably are running on Ubuntu LTS. Ah well, it’s all open source and all Linux. :slight_smile:

That said, having it work easily in Fedora via podman would be awesome for self-hosted instances.

1 Like

Here is the Ubuntu container LTS link

If these are OCI compliant containers, you should be able to run them with Podman too. It would be great if Fedora could offer something similar, but you know resources are needed for that.

It’s worse, the container is only supported to be build locally on an Ubuntu LTS host. So it goes against the portability usage of containers as a whole. That’s why I’m kicking so hard against Discourse. They have only one installation option, which is by container, but the container needs to be bootstrapped on an Ubuntu LTS host. So the question is not to support a Fedora image, but a Podman host such as Fedora. Sadly…

People,

After quite a while and with some help from @fitzy on Discourse Meta forum, I finally have a working version of Fedora-Podman-Discourse!

There is still some work to do on the site - the obvious thing being to get the Discourse mail facility talking to my IndiMail (QMail) Podman container . . so if you are motivated to sign up, please wait till I get that going at least . .

Anyway, here is what it looks like so far:

https://forum.philiprhoades.org/

and clone the Docker file and README from here:

git@gitlab.com:philip_rhoades/fpsd.git

Any feedback appreciated!

Regards,

Phil.

2 Likes

Hmmmm – maybe this could help test the Oauth2 group functionality @puiterwijk is working on. (Because we can’t test his patches in the hosted instance here.)

Happy to give it a shot!

1 Like

So, the patches are:

and should theoretically make this work, but we haven’t had a way to test it. Do you have oauth2 login for your site?

@mattdm ,

I am struggling to get the production version going - there is probably not much point trying to do the authentication stuff until I sort out the production issues? - back soon . .

1 Like

Yep, probably not. Let me know how it goes. We’ll need to get you a client id secret so your instance can auth against FAS, unless you have a different oauth2 provider which provides groups to test with.

Would this be a good usecase to track in Fedora Server/Cloud? Enabling more of the services thatdwe use to be self-hostable sounds like a good idea, even if for convenience we use a hosted solution.

(Looking at Matrix next)

2 Likes