Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

bitaculous/locomotivecms-locoroco

Repository files navigation

Travis CI Status Gemnasium Status

A ready to deploy LocomotiveCMS package.

We at Bitaculous really like LocomotiveCMS, it's our favorite tool for developing websites, it's awesome. That's why we built LocoRoco, so you can easier start using LocomotiveCMS on your server.

If you want to run LocomotiveCMS without setting up a server, check out LocomotiveHosting, a first class hosting solution from the team behind LocomotiveCMS. This also supports the development of LocomotiveCMS.

Credits

The team behind LocomotiveCMS for creating LocomotiveCMS.

Sony Computer Entertainment for creating The Real LocoRoco, an awesome platform video game.

Requirements

At Bitaculous we use the following stack to run LocomotiveCMS, that's why this package is made for:

Getting started

  1. Download the LocoRoco master or a specific release

  2. Unpack the file

  3. Install all dependencies with Bundler

    $ bundle install
    
  4. Create the application configuration

    Copy resources/config/application.yml to config/application.yml and adjust properly

  5. Start Unicorn

    $ unicorn_rails
    

That's it, LocomotiveCMS should run on.

Development

Specs

Use the rspec bin stub to run the specs:

$ ./bin/rspec

or via Guard:

$ guard -g spec

Spring (Rails application preloader)

$ ./bin/spring status

$ ./bin/spring rspec

$ ./bin/spring start
$ ./bin/spring stop

Deployment

First deployment

  1. Create configurations

    Copy resources/config/deploy.rb to config/deploy.rb and adjust properly

    Copy resources/config/environments/sample.rb to config/environments/<stage>.rb and adjust properly

    Copy resources/config/deploy/sample.rb to config/deploy/<stage>.rb and adjust properly

    Copy resources/config/unicorn/sample.rb to config/unicorn/<stage>.rb and adjust properly

  2. Setup shared and releases directory on stage

    $ cap <stage> deploy:check:directories
    
  3. Copy configurations to stage

    Copy config/application.yml to ~shared/config/application.yml (on stage)

    Copy config/environments/<stage>.rb to ~shared/config/environments/<stage>.rb (on stage)

    Copy config/unicorn/<stage>.rb to ~shared/config/unicorn/<stage>.rb (on stage)

  4. Check that the required files and directories exist on stage

    $ cap <stage> deploy:check
    
  5. Adjust LocomotiveCMS initializer (config/initializers/locomotive.rb).

  6. Adjust CarrierWave initializer (config/initializers/carrierwave.rb) if assets are hosted on Amazon S3 (optional).

  7. Continue with Regular deployment

Regular deployment

  1. Check-in and push your changes

  2. Run cap <stage> deploy to deploy a new version to the specified stage

Tasks

Unicorn

Start Unicorn

$ cap <stage> unicorn:start

Stop Unicorn (QUIT)

$ cap <stage> unicorn:stop

Restart Unicorn (USR2 + QUIT)

$ cap <stage> unicorn:restart

Misc

Clear sessions, cache, and socket files

$ cap <stage> cake task=tmp:clear

Clear sessions

$ cap <stage> cake task=tmp:sessions:clear

Clear cache

$ cap <stage> cake task=tmp:cache:clear

Clear sockets

$ cap <stage> cake task=tmp:sockets:clear

Configuration

Nginx

Take a look at resources/config/nginx/sample.conf as an inspiration on how to configure Nginx.

Bug Reports

Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems here.

Versioning

This project aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and / or a new version should be immediately released that restores compatibility.

License

LocoRoco is released under the MIT License (MIT), see LICENSE.