Skip to content

Instantly share code, notes, and snippets.

@mbejda
Last active April 17, 2019 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbejda/89f8c95f35ddec43dde0b7bfce24ed64 to your computer and use it in GitHub Desktop.
Save mbejda/89f8c95f35ddec43dde0b7bfce24ed64 to your computer and use it in GitHub Desktop.
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