Start cadence-server as pid 1 so it can capture and handle shutdown signals.
#!/bin/bash
-set -x
+set -ex
-dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/config/docker.yaml cadence-server --root $CADENCE_HOME --env docker start --services=$SERVICES
+dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/config/docker.yaml
+
+exec cadence-server --root $CADENCE_HOME --env docker start --services=$SERVICES
