Skip to content

Instantly share code, notes, and snippets.

@respondcreate
Last active October 6, 2016 13:32
Show Gist options
  • Save respondcreate/1dc6e66bec5a264d99632d615da91437 to your computer and use it in GitHub Desktop.
Save respondcreate/1dc6e66bec5a264d99632d615da91437 to your computer and use it in GitHub Desktop.
The user-data needed to launch a CodeDeploy EC2 with docker & docker-compose.
#!/bin/bash
sudo yum -y update
sudo yum install -y ruby
sudo yum install -y aws-cli
sudo yum install -y docker
sudo yum install wget -y
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo pip install docker-compose
cd /home/ec2-user
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
echo "export ENV_CONFIG_FILE_PATH=creds/dev_server_env" >> /home/ec2-user/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment