Following the setup instructions, so close! Error at very end!


(James Daly) #1

Hey guys,

Very impressed by the setup instructions found on discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub

Not only is a beginner like me able to follow them, I’m also learning loads while doing so, so thanks for that :slight_smile:

However, I’m stumped right at the finish line! And I’m hoping you can help me out.

I’ve followed each step, everything’s going swimmingly (including a 2GB drop), and at the last step I get this (have removed duplication for brevity of this post, also has an actual API key in SMTP password):

root@invincibletricking:~# /var/discourse/discourse-setup
Ports 80 and 443 are free for use
cp: cannot stat 'samples/standalone.yml': No such file or directory
Found 2GB of memory and 2 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

Does this look right?

Hostname      : forum.invincibletricking.co
Email         : james@invincibletricking.com
SMTP address  : smtp.sparkpostmail.com
SMTP port     : 587
SMTP username : SMTP_Injection
SMTP password : ••••••••••••••••••••••••••••••••••••

ENTER to continue, 'n' to try again, Ctrl+C to exit: 
sed: can't read containers/app.yml: No such file or directory
DISCOURSE_HOSTNAME change failed.
sed: can't read containers/app.yml: No such file or directory
DISCOURSE_DEVELOPER_EMAILS change failed.
sed: can't read containers/app.yml: No such file or directory
DISCOURSE_SMTP_ADDRESS change failed.
sed: can't read containers/app.yml: No such file or directory
DISCOURSE_SMTP_PORT change failed.
sed: can't read containers/app.yml: No such file or directory
DISCOURSE_SMTP_USER_NAME change failed.
sed: can't read containers/app.yml: No such file or directory
DISCOURSE_SMTP_PASSWORD change failed.

Unfortunately, there was an error changing containers/app.yml

Apologies if this is a super beginner question, very much hoping you can help me out!


(cpradio) #2

I think you need to cd /var/discourse then run ./discourse-setup


(James Daly) #3

You beautiful person! I think you’ve solved it! It’s configuring the file now and downloading the base image. Can’t thank you enough :slight_smile:


#4

Could this simple addition be added to the installer? I mean so that it uses the proper working directory?


(Jeff Atwood) #5

That is a question for @pfaffman – has this come up before? I think the instructions say to change to that directory, but can we block and exit if they have not, somehow?


(Joshua Rosenfeld) #6

The instructions do say to change the directory, but that is two sections above (with email in between). I can see someone who closes their SSH program for some reason to deal with SMTP stuff not being in the correct directory when they re-open SSH.


(Jeff Atwood) #7

I’m curious how you would even find the path at that point, since it references ./discourse-setup


(Joshua Rosenfeld) #8

Maybe they remembered it? I purely speculating at this point…

In the above code @JamesDaly did enter the full path.


(Jay Pfaffman) #10

It seems like if you’re familiar enough with UNIX to know to type a full path (which cause problem) then you should be able to figure out how to change to the directory like the instructions say. I don’t think this happens often.

That said, I’ll make it so that you can call the script from any directory the next time I submit a PR.