That’s exactly the guide that I’ve been following. I practically copy and paste all the commands into my terminal. It’s when I get the ./discourse-setup running… I get past putting all the information in… and then it goes through all the lines of configuring and installing everything.
Unfortunately, it installs some bundler-1.16.0, after doing a bunch of nginx stuff, and then gets stuck at the cd /var/www/discourse && chown -R discourse /var/www/discourse
I was wondering why it got stuck… so I went to look for the folder myself to see if I could manually grant it the proper ownership/permissions… but the folder doesn’t even exist.
Everything is being run as sudo. I’m on Ubuntu 17.1.
I had been running the server off an SSD until recently. That ended up completely dying on me (it was a fairly old SSD, so I was kind of expecting it to happen eventually). The server’s currently running on some old laptop HDD that I had laying around.
Thanks for the reply! Glad to know that the process will speed up once I can get my hands on another SSD for the server!
I realize that chown doesn’t always run slow. It is only when there has been a previous, unsuccessful attempt at rebuild.
If it is a fresh rebuild, then chown seems to complete very quickly. If there has been a previous failed rebuild (e.g. a typo in app.yml), then it takes forever to chown. Perhaps the old files are still there?
Hi, bit of a bump, but I have had the same problem since I first tried Discourse.
From my understanding, chown will set the ownership of all files, irregardless of the current owner. Of course after the first setup the files should already be owned by the discourse user, so there is no need to change them all, just the new ones.
On my install I’ve changed the web.template.yml to use find to change only files that aren’t already owned by discourse. That part of a rebuild used to take 8+ minutes (VM on ZFS with no SSD) and now its almost instant.
There are a couple of instances of chown in the template, but I think the “main” one is this one:
Maybe could this be put into the native application template?
I haven’t rebuilt the app on disk for a while now, since the upgrade via web admin console works like a charm. Upgrading in the docker container works different to the shell rebuild as far as I would guess for now.
I don’t have exact times, but I’d say 10 minutes at least where the Docker container was just idle with chown (did a docker exec to inspect what it was doing). System here is running with limited IOPs on a hosting platform.
One could also install parallel or alter the way find executes chown in multiple processes, e.g. per directory. Would such make sense for a PR?