diff --git a/README.md b/README.md index 471e6eab..4cf1c7f6 100644 --- a/README.md +++ b/README.md @@ -37,13 +37,13 @@ LETSENCRYPT_HOST=mydomain.com \ ``` Once your instance has started, it will take a moment to get your SSL certificate. Make sure you have a A or CNAME record on your domain that points to the IP/DNS of your server running Statup. -## Run on AWS EC2 +## Run on EC2 Server Running Statup on the smallest EC2 server is very quick using the AWS AMI Image: `ami-84da93fc`. ```bash -ec2-run-instances --key KEYPAIR ami-84da93fc +ec2-run-instances --key KEYPAIR ami-7ad39a02 ``` -# EC2 with SSL Certificate +# EC2 with Automatic SSL Certificate ```bash wget https://raw.githubusercontent.com/hunterlong/statup/master/servers/ec2-ssl.sh # @@ -51,12 +51,9 @@ wget https://raw.githubusercontent.com/hunterlong/statup/master/servers/ec2-ssl. # # nano ec2-ssl.sh # -ec2-run-instances --key KEYPAIR \ - --user-data-file ec2-ssl.sh \ - ami-bf5eb9d6 +ec2-run-instances --key KEYPAIR --user-data-file ec2-ssl.sh ami-7ad39a02 ``` - ## Email Nofitications Statup includes email notification via SMTP if your services go offline. diff --git a/servers/ec2-ssl.sh b/servers/ec2-ssl.sh index 0f641186..f217d933 100644 --- a/servers/ec2-ssl.sh +++ b/servers/ec2-ssl.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 ## Domain for new SSL certificate LETSENCRYPT_HOST="status.balancebadge.io" @@ -11,6 +10,7 @@ LETSENCRYPT_EMAIL="info@socialeck.com" ############# Leave this part alone ############### ################################################### +exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 printf "Statup will try to create an SSL for domain: $LETSENCRYPT_HOST\n" printf "\nexport LETSENCRYPT_HOST=$LETSENCRYPT_HOST\n" >> /home/ubuntu/.profile printf "export LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL\n" >> /home/ubuntu/.profile diff --git a/servers/init.sh b/servers/init.sh index d3794b50..d178b30c 100644 --- a/servers/init.sh +++ b/servers/init.sh @@ -46,10 +46,13 @@ fi sudo docker system prune -af logger "Status Process complete. IP: $EC_IP | DNS: $EC2_ENDPOINT\n" +printf "Status Process complete. IP: $EC_IP | DNS: $EC2_ENDPOINT\n" +# commands to reverse installation and only leave init.sh #sudo docker rm -f $(sudo docker ps -a -q) #sudo docker rmi $(sudo docker images -q) #rm -rf docker-compose.yml #sudo rm -rf statup #sudo rm startup.sh +#sudo docker system prune -af #sudo service docker stop