Show
Destroy
An entry
Get it down. Make it good. Share it.
Title
Text
I've been using Dreamhost.com for several years, hosting a few sites. I've since used Heroku, and I've grown accustomed to being able to deploy code using Git. git push heroku master became a convenience I rely upon. I wanted to be able to push to Dreamhost using Git. I was able to accomplish it by 1) creating a folder to push to, and 2) modifying the hooks/post-receive file in the .git folder on my Dreamhost account to deploy the site after pushing. #### Create a folder to push to Create a place to push your Git repo to in Dreamhost. For example, I created the folder ryanwold.com.git for the website ryanwold.com. // on a Dreamhost VPS server ryanwold.com # where the Rails app lives ryanwold.com.git # the Git destination to push to #### Modify hooks/post-receive to deploy after being pushed to // in hooks/post-receive file, add: #!/bin/sh git --work-tree=/home/username/site.com --git-dir=/home/username/site.com.git checkout -f cd /home/username/site.com bundle install touch tmp/restart.txt
Status
idea
draft
release
personal
Series
Part of a Series?
Bitcoin
On Work
Phoenix Trello Tutorial
Civics
Re Email Address
Tags
dreamhost
×
webhosting
×
+
Slug
Url
Image 1
Image 2
Image 3
Visible
Date