From 861d584d53e33eddc34a4e046f3423508c6fe0ff Mon Sep 17 00:00:00 2001 From: dunjh Date: Sat, 4 May 2013 06:12:15 -0700 Subject: [PATCH] Add latest deployment log in Dreamhost for 2013, May --- Dreamhost.textile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Dreamhost.textile b/Dreamhost.textile index 7f7de6d..02ff251 100644 --- a/Dreamhost.textile +++ b/Dreamhost.textile @@ -124,4 +124,27 @@ You can verify that Passenger is being used by accessing the app from the websit [b]Why should you run tracks under a separate user account?[/b] DreamHost runs a daemon that kills applications that use too much memory. From my testing, it appears that when you run multiple sites under the same user, for instance, a Rails application and a PHP application, then the Rails application will frequently get killed when the combined memory use exceeds somewhere in the neighborhood of 125MB. However, it appears that the daemon only monitors on a per user basis as I am able to run a Rails app under one user account, a Perl FastCGI app under another, and a PHP app under a third all simultaneously without issue. -"http://wiki.dreamhost.com/Killed":http://wiki.dreamhost.com/Killed \ No newline at end of file +"http://wiki.dreamhost.com/Killed":http://wiki.dreamhost.com/Killed + +h2. Installing 2.2.1 + +As of May 2013, these steps work for installing on DreamHost. +I just tried for the whole afternoon on May-4, 2013 to install Tracks 2.2.1 on my Dreamhost account (tracks.dunjh.com). Basically I followed all above steps and they worked for me. So below I will write down what I've done and anything not clear please just send me mail. + +Firstly, I installed 2.0 followed above step (mentioned in http://tracks.smajn.net), then following the upgrade guide in version 2.2.1/doc/upgrading.textile upgrade step by step from 2.0 -> 2.1 -> 2.1.4 -> 2.2(not working because Dreamhost has only Ruby 1.8.7) -> 2.2.1, and finally 2.2.1 is working well at the moment. But I believe if you want to install one on Dreamhost, you can safely start from 2.2.1 directly. + +1. Added a subdomain with a new user account (SSH enabled) and Passenger enabled (Basically I didn't use new user account, but according to above experience from smajn, it never hurts.) + +2. Download and unpack the tracks application to the home directory (just use wget in putty, very simple, no need to download then ftp). + @wget https://github.com/TracksApp/tracks/archive/v2.2.1.zip +** @unzip v2.2.1.zip + +after setup the new subdomain, in my shell home folder, there's a "tracks.dunjh.com" folder, basically you can delete it safely, and rename the unzipped tracks folder (might be named "tracks_2.2.1") to tracks.dunjh.com, then you will have the "public" ready inside it. +3. Edit @site.yml@ and @database.yml@, you need to create a mysql DB from the Dreamhost control panel, and set it in the database.yml "production" section. And make sure in database.yml you are using mysql2 as adapter. + +4. Get all required gems (I don't think Dreamhost likes this ^_^, this step is quite slow), run @bundle install --without development test +5. Get your DB initialized, run @bundle exec rake db:migrate RAILS_ENV=production +6. Precompile your static assets (css, javascript, etc.) by running @bundle exec rake assets:precompile. +7. Now you are ready to rock&roll. Leave your putty alone. Go open your web browser, input the new subdomain you just created (e.g. in my case tracks.dunjh.com), if everything is fine, you'll see the sign-up page of your new installed world available Tracks, create you account and you can start your GTD journey. +8. Basically upgrading is simple, but one thing you need to know is that if anything changed in your app folder, to make the passanger restart your application, you'll need to "touch" the file tmp/restart.txt. This file does not exist in the folder in my case, so I just created one and then when you refresh the web page, the application is reloaded. +9. As I checked in Dreamhost it is using Ruby 1.8.7, and according to the release notes of Tracks 2.2.1, in next release it will not support 1.8.7 any more, so it is quite possible that I don't need to upgrade any more, what a pity. Hopefully I could find some way to upgrade the ruby version in Dreamhost recently or I may block here for some time (or change to use VPS Orz...) \ No newline at end of file