Add Restart Policy to hpdevkit container (#7)

This commit is contained in:
Kithmini Gunawardhana
2022-09-06 09:17:37 +05:30
committed by GitHub
parent bd84875d04
commit 7e6554b232
2 changed files with 37 additions and 16 deletions

View File

@@ -54,6 +54,10 @@ function devKitContainer() {
command+=" --entrypoint /bin/bash"
fi
if [ ! -z "$RESTARTPOLICY" ]; then
command+=" --restart $RESTARTPOLICY"
fi
command+=" -e CLUSTER=$cluster -e CLUSTER_SIZE=$clusterSize -e DEFAULT_NODE=$defaultNode -e VOLUME=$volume -e NETWORK=$network"
command+=" -e CONTAINER_PREFIX=$containerPrefix -e VOLUME_MOUNT=$volumeMount -e BUNDLE_MOUNT=$bundleMount -e HOTPOCKET_IMAGE=$instanceImage"
command+=" -e CONFIG_OVERRIDES_FILE=$configOverridesFile -e CODEGEN_OUTPUT=$codegenOutputDir"
@@ -96,7 +100,7 @@ function initializeDeploymentCluster() {
AUTOREMOVE="true" MOUNTSOCK="true" CMD="cluster stop ; cluster create" devKitContainer run
# Spin up management container.
NAME="$deploymentContainerName" DETACHED="true" MOUNTSOCK="true" MOUNTVOLUME="true" devKitContainer run
NAME="$deploymentContainerName" DETACHED="true" MOUNTSOCK="true" MOUNTVOLUME="true" RESTARTPOLICY="unless-stopped" devKitContainer run
# Bind the instance mesh network config together.
CONTAINERNAME="$deploymentContainerName" executeInContainer "cluster bindmesh"