Last active
April 17, 2019 19:35
-
-
Save mbejda/89f8c95f35ddec43dde0b7bfce24ed64 to your computer and use it in GitHub Desktop.
boot-script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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