I’m trying to setup discourse on a DigitalOcean droplet.
I installed docker and discourse successfully via ssh.
When I run ./discourse-setup, I’m directly prompted for the SMTP password; I do not get any of the following questions:
Hostname for your Discourse? [discourse.example.com]:
Email address for admin account? [me@example.com]:
SMTP server address? [smtp.example.com]:
SMTP user name? [postmaster@discourse.example.com]:
SMTP port [587]:
This is what I get when I try to run the setup command.
I’ve read in the forums that 1GB memory should be enough; do you think it might be the problem?
root@discourse:~# /var/discourse/discourse-setup
Ports 80 and 443 are free for use
cp: cannot stat ‘samples/standalone.yml’: No such file or directory
Found 1GB of memory and 1 physical CPU cores
sed: can’t read containers/app.yml: No such file or directory
sed: can’t read containers/app.yml: No such file or directory
containers/app.yml memory parameters updated.
grep: containers/app.yml: No such file or directory
grep: containers/app.yml: No such file or directory
grep: containers/app.yml: No such file or directory
grep: containers/app.yml: No such file or directory
grep: containers/app.yml: No such file or directory
grep: containers/app.yml: No such file or directory
grep: containers/app.yml: No such file or directory
Most folks follow instructions and cd /var/discourse.
It only happens if someone has enough unix knowledge to know that typing the full path “should” work and then doesn’t have enough knowledge to guess from messages like “no such file or directory” (which were omitted from the original description of the problem) that it’s some kind of path issue.
I was in the /var/discourse directory, yet I was also not prompted for any settings besides the password. I had just run ./discourse-setup after a fresh clone of the docker git repo. I was following this guide and had created containers/app.yml with the suggested contents, but that didn’t help. My solution was to comment out the check_port lines in the discourse-setup script… /shrug
Edit: still hitting some issues with the port stuff…
If the port is in use you should get a message that says that it’s in use. Did that not happen?
But if app.yml exists, the script assumes that you’ve successfully installed and need to reconfigure. If you created app.yml by hand, then discourse-setup can’t be held responsible. Is that what happened?
And if you removed the check ports test, then it’s not surprising that something else might be using the ports needed. You’re on your own at that point.
So following the guide I was linked, I copy/pasted the suggested containers/app.yml contents (since running ./discourse-setup complained about ports being in use). The reason I copy/pasted the file was because there was no file after initially running the setup (which failed on port check). After commenting out the port check, the docker run failed (port conflict) but it successfully generated the app.yml. I adjusted the yaml per the guide, re-built the app, then it worked. Perhaps I missed a step in generating the initial app.yml or something is missing in the guide?
I had a similar issue, i think the guide you linked assumes that the app.yaml has been created already, it seems to be a truncated version that doesn’t actually have the SMTP fields. If you had the setup script prompt you only for a password and the password exampe was [] instead of [pa$$word] then i think that may have been the problem.