Skip to content

Instantly share code, notes, and snippets.

@mikepaszkiewicz
mikepaszkiewicz / user-data.sh
Created Dec 11, 2020 — forked from abhilash1in/user-data.sh
Install nvm and NodeJS using AWS EC2 user data script
View user-data.sh
#!/bin/bash
apt-get -y update
cat > /tmp/subscript.sh << EOF
# START UBUNTU USERSPACE
echo "Setting up NodeJS Environment"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc
# Dot source the files to ensure that variables are available within the current shell
. /home/ubuntu/.nvm/nvm.sh
@mikepaszkiewicz
mikepaszkiewicz / Dockerrun.aws.json
Created Mar 6, 2017 — forked from philipithomas/Dockerrun.aws.json
Staffjoy Elastic Beanstalk Deploy Script
View Dockerrun.aws.json
{
AWSEBDockerrunVersion: "1",
Authentication: {
Bucket: "staffjoy-deploy",
Key: "docker.cfg"
},
Image: {
Name: "staffjoy/app:TAG",
Update: "true"
},