Created
June 3, 2021 14:15
-
-
Save grumpysi/c7636c8cffc466c3ce919e67b6eee09d to your computer and use it in GitHub Desktop.
Install pisignage docker image on AWS EC2 instance using user data 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
Amazon Linux 2 AMI (HVM) x86 | |
Instance Type: t2.micro | |
Key pair create | |
VPC | |
Security: | |
SSH 22 from current IP | |
Custom TCP 3000 from current IP | |
Add the following to user data box: | |
#!/bin/bash | |
yum update -y | |
amazon-linux-extras install docker -y | |
service docker start | |
usermod -a -G docker ec2-user | |
systemctl enable docker | |
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
su ec2-user | |
curl -L https://raw.githubusercontent.com/colloqi/pisignage-server/master/docker-compose.yml -o ~/docker-compose.yml | |
cd ~/ | |
/usr/local/bin/docker-compose up -d | |
Sources: | |
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html | |
https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment