Setting up a New Instance



This is a pretty common setup scenario for a new Beach Platform Instance, that may include a couple of different custom engines, and the issues you may encounter along the way.

  1. Create Parent Rails Application
  2. Install Beach Core Engine

1. Create Parent Rails Application

The Beach Platform architecture requires a fairly lightweight parent Rails application.

Avoiding a deep dive into what makes up this application (I’ll reserve that for a future Topic), you can use this Starter Project :nerd_face:

Beach Platform Starter Project - Github

You will need to find & replace the NewApp part of the application name, renaming files, directories and code to your app name.

// TODO: A generator or rake task to automate this!!!

To complete initial setup, run…

bundle install
bundle exec rails db:setup

2. Install Beach Core Engine

Although the above starter project includes the Beach Core engine’s gem as a dependency, we need to complete the initialisation of it.

Add this line to your application’s Gemfile:

rails beach_api_core:install:migrations


run migrations:

rake app:db:create
rake app:db:migrate
rake app:db:test:prepare

run seeds:

rake beach_api_core:seed  

Now if you run the rails server, you should be able access your local dev environment.

http://localhost:3000 - this will show the API Docs
http://localhost:3000/admin - this will give you access to the admin login screen

Deploying Beach Platform to AWS with Cloud66