Skip to content

Instantly share code, notes, and snippets.

@aray12
Last active November 11, 2015 22:54
Show Gist options
  • Save aray12/b5c0afe4b8712c3f1066 to your computer and use it in GitHub Desktop.
Save aray12/b5c0afe4b8712c3f1066 to your computer and use it in GitHub Desktop.
# /etc/rc.d/rc.local
HOMEDIR = /home/ec2-user
GITREPO = [email protected]:org/project.git
GITDIR = $HOMEDIR/project
cd $HOMEDIR
# Clone the latest version
git clone $GITREPO
# Copy .env into the project root so dotenv can find it
cp $HOMEDIR/.env $GITDIR
# Install dependencies and run server
cd $GITDIR
sudo npm install
sudo npm start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment