Hi,
I have installed Discourse on a Fedora 31 server with the recommended install guide, however used podman instead of docker for running the container. It all went perfectly fine this morning when I initially set it up, however I had troubles getting plain HTTP to my Nginx on the host to work and had to use the SSL certs on both nginx instances. I configured Discourse and all was fine.
I later decided to rebuild Discourse with SSL turned off and build it on a non-root user account. Plain HTTP to host worked fine, however I got a white page (title was fine, favicon worked).
root@xena-app:/var/www/discourse# ls public/assets -al
total 15640
drwxr-xr-x. 2 discourse discourse 10 Jan 11 13:54 .
drwxr-xr-x. 3 discourse discourse 29 Jan 11 13:57 ..
-rw-r--r--. 1 discourse discourse 595 Jan 11 13:49 _activate-account-7a1f8d46287194007ee607f79af56217e6e6238e4ca159c5da6974005a1254c5.js
-rw-r--r--. 1 discourse discourse 250 Jan 11 13:54 activate-account-7a1f8d46287194007ee607f79af56217e6e6238e4ca159c5da6974005a1254c5.js.br
-rw-r--r--. 1 discourse discourse 420 Jan 11 13:54 activate-account-7a1f8d46287194007ee607f79af56217e6e6238e4ca159c5da6974005a1254c5.js.gz
-rw-r--r--. 1 discourse discourse 695 Jan 11 13:54 activate-account-7a1f8d46287194007ee607f79af56217e6e6238e4ca159c5da6974005a1254c5.js.map
-rw-r--r--. 1 discourse discourse 990519 Jan 11 13:50 _admin-91c2a24a61c0ecd0200db1e808dbadafb9f0f1bb5179acea5b2b7dbd4b4cc5f9.js
-rw-r--r--. 1 discourse discourse 83903 Jan 11 13:54 admin-91c2a24a61c0ecd0200db1e808dbadafb9f0f1bb5179acea5b2b7dbd4b4cc5f9.js.br
-rw-r--r--. 1 discourse discourse 106465 Jan 11 13:54 admin-91c2a24a61c0ecd0200db1e808dbadafb9f0f1bb5179acea5b2b7dbd4b4cc5f9.js.gz
-rw-r--r--. 1 discourse discourse 366446 Jan 11 13:54 admin-91c2a24a61c0ecd0200db1e808dbadafb9f0f1bb5179acea5b2b7dbd4b4cc5f9.js.map
drwxr-xr-x. 2 discourse discourse 4096 Jan 11 13:54 admin-login
...
The files that were requested are indeed missing, even Nginx says so:
2020/01/11 13:59:49 [error] 60#60: *20 open() "/var/www/discourse/public/assets/plugins/poll-57c9059384e3daeaee3d974c985d85a2b8462bb2629eb0b1834451056d1e1459.js" failed (2: No such file or directory), client: 10.0.2.2, server: _, request: "GET /assets/plugins/poll-57c9059384e3daeaee3d974c985d85a2b8462bb2629eb0b1834451056d1e1459.js HTTP/1.0", host: "idlerpg.xyz", referrer: "https://idlerpg.xyz/"
I thought that this would be an issue with my install, because they were here on the old install this morning as root on the host! I have wiped the shared folder and rebuilt as non-root with the same results over and over. Then I tried again, this time as root with identical settings like this morning, and I got the same issues.
A non-root install always shows the “Congratulations, you have installed Discourse!” page, but after I finish the install, I get the blank page because the asset files are missing.
Changed this as a bug. I cannot manage to get a version with all assets when building tests-passed.
I tried entering the container and doing a rake assets:precompile, but the same assets are still gone
Okay, after some testing, I can now tell that it always shows a blank page after every rebuild. If I run RAILS_ENV=production bin/rake assets:precompile, it always works afterwards. No idea why, it should compile them in a rebuild anyways?
We’re here because something doesn’t work. Should and does are different states.
You are confidently asserting that Podman is not implicated. It would good to prove that to clearly eliminate it as a factor. AFAIK, you haven’t completed the official install method with Docker to see if that eliminates the problem.
Interesting so the files are crafted just fine, but the persistence fails?
I’d look into how the podman volume is working, and what is the driver that is backing it. In the Docker world we have a lot of weird issues with storage drivers over the years, which made we even keep a list of “blessed” drivers in our launcher script.
To be clear, my experiments with podman were really testing launcher not discourse. At least when I tested it, it depended on output details of docker that podman doesn’t try to emulate.
@Adriany, I’m guessing you are using the default storage driver, which is the same one that is recommended for discourse, which in docker is "overlay2* — but I don’t know that to be the case.
I am using overlayfs, which is the equivalent to overlay2.
Interestingly, it just built fine with no missing assets after some more builds with missing assets when I tried to add plugins. When I rebuilt without plugins, it went butter smooth. Huh?
Edit: It did work for me and now the assets are cached here. During running, it stopped working for other users.
Edit 2: Another rebuild made it break assets like before and the fix was to rebuild as before.
If files are crafted successfully by our assets pipeline and the OS says there is no error, but they disappear after the rebuild (which effectively restarts the container) I’d (re-)place my bet on the podman storage driver.
Unless someone can reproduce this same behavior using Docker (and there would be several topics if this was the case), I’m afraid you need to open a ticket on the Podman project about this.