Skip to content

Instantly share code, notes, and snippets.

@mbejda mbejda/boot.sh
Last active Apr 17, 2019

Embed
What would you like to do?
boot-script
#!/bin/bash -xe
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
cd ~/init;
sudo curl https://gist.githubusercontent.com/mbejda/fdfcb9891f3cd72a0adafb6dab10ab7b/raw/docker-compose.yml > ~/init/docker-compose.yml;
sudo curl https://gist.githubusercontent.com/mbejda/fdfcb9891f3cd72a0adafb6dab10ab7b/raw/upload.ini > ~/init/upload.ini;
docker-compose -f /home/ec2-user/init/docker-compose.yml up -d;
while [ ! -d /var/lib/docker/volumes/init_wp_themes ]
do
sleep 2
done
echo "[INIT] setting permissions";
chown -R 33:33 /var/lib/docker/volumes;
chmod -R 644 /var/lib/docker/volumes;
echo "done";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.