Find file
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (50 sloc) 2.57 KB

Getting Started in Development

cp config/database.sample.yml config/database.yml
rake gems:install
rake db:create:all db:schema:load

Run the specs:

rake spec

Oh wait, there are massive spec failures. I'll try to hack on that later.

To use at http://localhost:3000/ :

  • Add a user at http://localhost:3000/signup
  • If you don't get a confirmation email (which you likely won't since you don't have the mail sending configured), check log/development.log for a copy of the confirmation email that would have been sent to you, copy and paste the activation url from it into the browser toolbar (should look like the following: http://tt.entp.com/activate/db61f839776898cedee72fcb9f87465d797e2e93 - of course, replace tt.entp.com with your dev server address.

Deploying

To deploy, you need to create the following files (we provide also the default template for those files to get you started):

config/deploy/production.rb

set :rails_env, :production
server 'example.com', :app, :web, :db, :primary => true

config/deploy/staging.rb

set :rails_env, :staging
server 'staging.example.com', :app, :web, :db, :primary => true

config/initializers/usertime_config.rb

Stop::UserTime.configure do |config|
  config.key = "sekrit"
end

config/initializers/custom.rb

TT_HOST  = 'example.com'
TT_EMAIL = 'admin@example.com'
SIGNUPS_ENABLED = false

ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.update \
 :time => '%I:%M %p'

config/moonshine/production.yml

# production-specific moonshine configuration
#
# You can set anything here that you might normally put in config/moonshine.yml, but will only apply to production

# Primary domain application will be accessed as 
:domain: example.com

# Domain aliases for applaction. One common use of this is for asset hosts.
#:domain_aliases:
#  - assets1.yourapp.com
#  - assets2.yourapp.com

config/moonshine/staging.yml

# staging-specific moonshine configuration
#
# You can set anything here that you might normally put in config/moonshine.yml, but will only apply to staging

# Primary domain application will be accessed as 
:domain: staging.example.com

# Domain aliases for applaction. One common use of this is for asset hosts.
#:domain_aliases:
#  - staging.assets1.yourapp.com
#  - staging.assets2.yourapp.com

Once you've added those files and made changes as appropriate, you should be able to get going and just use regular old moonshine deployment techniques.