Report on using discourse_docker on a CoreOS image

Discourse installs without any modifications on CoreOS beginning with:

https://github.com/discourse/discourse_docker/pull/100/commits

Using CoreOS’ fleet is trivial but requires a small change which prevents that a different restart policy than below is set when boostrapping or rebuilding:

--- a/launcher
+++ b/launcher
@@ -319,5 +319,5 @@ if compare_version "1.2.0" "$docker_version"; then
   echo "We recommend you upgrade docker, the version you are running has no restart policies, on reboot your container may not start up"
   restart_policy=""
 else
-  restart_policy=${restart_policy:---restart=always}
+  : ${restart_policy:="--restart=no"}
 fi

… and here is an exemplary service file:

[Unit]
Description=Discourse for my EVE Online clan
ConditionPathIsDirectory=/var/discourse/shared/section8dot
After=docker.service
Requires=docker.service

[Service]
Environment="SUPERVISED=true"
WorkingDirectory=/var/discourse
ExecStart=/var/discourse/launcher start section8dot
ExecStop=/var/discourse/launcher stop section8dot
ExecStopPost=-/bin/bash -c "/usr/bin/systemctl stop docker-$(docker ps -a --no-trunc | grep -m 1 -F discourse/section8dot:latest | cut -d ' ' -f 1).scope"

[Install]
WantedBy=multi-user.target