Start Discourse on Boot

unsupported-install

(MorphZan) #1

Hi Guys

I am running Discourse on an Ubuntu Install and would like to know how I go about getting it to run the following commands on startup so that if my server reboots I dont need to SSH in to start up Discourse:

cd ~/discourse
bundle exec rails server --binding=0.0.0.0


(Sam Saffron) #2

To start on boot use our official docker install


(MorphZan) #3

Does this require me to reinstall from scratch?


(Sam Saffron) #4

It requires you to install following our official guide at discourse/INSTALL.md at master · discourse/discourse · GitHub


(MorphZan) #5

Thank you :slight_smile:

Will give it try tomorrow!!!


(ljpp) #6

Hijacking a thread a little, but I’ve noticed something a couple of times and this is not worth its own topic.

I sometimes:

./launcher rebuild app && reboot

However the following start on boot has failed for me a couple of times. Non-fatal issue as stopping and starting the container has done the trick.

Odd thing, though. Linux should reboot gracefully.


(Sam Saffron) #7

You need to confirm you are on the latest version of docker. If so, and if you can reproduce the issue a ticket should be raised with docker.

All we do is tell docker to restart=always so it should be taking care of this.


(Jay Pfaffman) #8

I don’t know whether it’s related, but if you do a shutdown -r rather than a reboot it will shut down more gracefully.


(ljpp) #9

Yeah, or maybe adding a little wait after rebuild.

@sam Yep latest. Actually got this yesterday when I was doing a fresh install (Ubu 16.04).