Last active
December 11, 2015 00:19
-
-
Save jbaudanza/4515888 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash -ex | |
exec >> /var/log/user-data.log | |
# Download ubuntu packages | |
apt-get update | |
apt-get install -y ntp git-core ruby1.9.1-dev ruby1.9.1 libopenssl-ruby libxslt1-dev libxml2-dev build-essential nginx-extras postgresql mosh redis-server libpq-dev | |
gem install bundler foreman --ignore-dependencies --no-ri --no-rdoc | |
# Create app user | |
useradd -m -s /bin/bash app | |
sudo -u postgres createuser -d -S -r app | |
# Continue the rest of the script as the deploy user | |
su app | |
mkdir -m 700 ~/.ssh | |
mkdir ~/buildpacks ~/repos ~/slugs ~/cache | |
curl https://github.com/jbaudanza.keys > ~app/.ssh/authorized_keys | |
git clone --bare git://github.com/jbaudanza/bluevan.git ~/repos/bluevan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment