Discourse on CoreOS won't autostart after reboot


#1

Hi there,

I just installed the latest discourse_docker on the latest CoreOS 509.1.0. Setup was really easy and smooth, and everything worked out of the box. The only issue I’m facing now is that Discourse won’t autostart when rebooting the server. Any tips as to why? Or is it this issue?

Thanks for the help!


(Sam Saffron) #2

What version of Docker is in that channel?


#3

Thanks for the reply Sam. Docker is at 1.3.2.

I just created a systemd unit that runs “/var/discourse/launcher start app”, but I wondered if that’s the appropriate way of doing it or not.


(Sam Saffron) #4

well we should have a restart policy in place, so it should no be needed.

Try:

cd /var/discourse
git pull
./launcher rebuild app
reboot

Does it come back ?


#5

Does it come back ?

Nope.


(Sam Saffron) #6

Sounds really weird … we have a restart policy in place Announcing Docker 1.2.0 - Docker Blog did coreos do something to disable it?

Perhaps the docker daemon is only launched manually somehow


#7

I’m not terribly familiar with Docker, how can I check the restart policies?


#8

The Docker daemon does get launched automatically, because I don’t have to manually start it before launching Discourse.


(Sam Saffron) #9

coreos has some fancy that it only starts services on demand… afaik


(Ernest Lee) #10

Can you post your systemd script? My script hit systemd cgroup scope somehow gets left behind not allowing containers to start · Issue #7015 · moby/moby · GitHub .


#11

/etc/systemd/system/discourse.service

[Unit]
Description=Discourse
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
ExecStart=/var/discourse/launcher start app

[Install]
WantedBy=multi-user.target