Skip to content
Snippets Groups Projects
Commit 36c2f0b4 authored by baldwinlouie's avatar baldwinlouie Committed by Yas Naoi
Browse files

Issue #3278479 by baldwinlouie, yas: Update CFn to restart Docker after EC2 instance is restarted

parent 4d4a31e0
Branches 2497145-front-page
No related tags found
No related merge requests found
......@@ -74,9 +74,9 @@ Fn::Base64:
sudo systemctl enable docker
LINK_MEMCACHE=''
if [[ "${InstallDB}" == 'TRUE' ]]; then
if [[ "${InstallMemcache}" == 'TRUE' ]]; then
sudo docker pull memcached
docker run --name cloud-orchestrator-memcache -d memcached
docker run --name cloud-orchestrator-memcache -d --restart always memcached
LINK_MEMCACHE='--link cloud-orchestrator-memcache:memcache'
fi
......@@ -92,7 +92,7 @@ Fn::Base64:
-e MYSQL_USER=${MySQLUserName} \
-e MYSQL_PASSWORD=${MySQLPassword} \
-v $MARIADB_DIR:/var/lib/mysql \
-d --name mariadb mariadb
-d --restart always --name mariadb mariadb
fi
# Run the cloud orchestrator docker installer
......@@ -102,7 +102,7 @@ Fn::Base64:
sudo docker build -t $IMAGE_TAG $DOCKER_FILE_URL
sudo docker run --name $CONTAINER_NAME $LINK_DB $LINK_MEMCACHE \
-p 80:80 -d -v $CO_DIR:$DOCKER_DIR $IMAGE_TAG
-p 80:80 -d --restart always -v $CO_DIR:$DOCKER_DIR $IMAGE_TAG
# Set up a drush command.
sudo docker exec -w $DOCKER_DIR $CONTAINER_NAME sh -c "ln -s '$DOCKER_DIR/vendor/bin/drush' /usr/local/bin/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment