Skip to content

Commit 90b8fab

Browse files
committed
fix(systemd units): Fix docker containers being orphaned
Docker seems to orphan our containers after the fix in 6b452e, this reverts part of it and properly signals the docker containers to stop. Given that we run them with `--rm`, this also makes the ephemeral containers destroy their data off of the drives. The data containers are not affected by this and they persist.
1 parent dfbae84 commit 90b8fab

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

systemd/deis-controller.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ TimeoutStartSec=20m
99
ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller`; docker history $IMAGE >/dev/null || docker pull $IMAGE"
1010
ExecStartPre=/bin/sh -c "docker inspect deis-controller >/dev/null && docker rm -f deis-controller || true"
1111
ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && docker run --name deis-controller --rm -p 8000:8000 -e PUBLISH=8000 -e HOST=$COREOS_PRIVATE_IPV4 --volumes-from=deis-logger $IMAGE"
12+
ExecStopPost=/usr/bin/docker stop deis-controller
1213

1314
[Install]
1415
WantedBy=multi-user.target

0 commit comments

Comments
 (0)