- Make sure you have rvm installed for automatic command aliasing.
- Docker
- Fig
When cd'ing into the project directory tree in your local workstation's terminal app, rvm will automagically notice that you have switched to the project and setup the following general use commands.
- npm
- bower
- ember
If you don't have rvm installed then you may manually execute . setup.sh from the project root directory before using any of the general use commands.
All of these commands run with the working directory set to the project root directory. All commands execute within a docker container.
To start the services, simply execute the regular fig up command.
fig up
This will start the ember-cli server watching for file changes and refreshing the browser. The webapp can be accessed at the IP identified via boot2docker ip on port 4022 using your workstations browser.
We wanted a simple approach to Git that anyone can pick up quickly, but has the power and flexibility you'd expect from Git. We set it up so the cordova, ember, and rails directories are expected to each be their own Git repositories. Thus those directories are ignored by this project's repo.
By having the directories that contain your app code ignored by Git, you are free to pull in the latest version of this project at any time without affecting your app.
While you could go with a complex subtree or submodule approach, we felt this was simplier.
Your project will start out with three empty directories that will house your application code.
- cordova: this will contain any PhoneGap related files your project may use.
- ember: this will contain the Ember.js portion of your app. The
embercommand maps to this directory. - rails: this will contain the Ruby On Rails portion of your app. The
railscommand maps to this directory.
Use one of the following methods (or mix and match) to get started.
Starting with these initial files, execute the following commands to create a new Ember.js project and a new Ruby on Rails project.
- make sure
boot2docker uphas been executed. - Rename the project root directory to whatever you want for a project name.
- cd into that project directory.
- Do an
ember initto create a new ember project in the current project dir. - Do a
rails new app_name_hereto create a new rails project. fig up
Straight up assuming you're using Git here, and already have projects available.
- make sure
boot2docker uphas been executed. - Rename the project root directory to whatever you want for a project name.
- cd into that project directory.
- Do a git clone to the ember directory.
git clone git@github.com:USER_NAME/EMBER_APP_NAME.git ember - Do a git clone to the rails directory.
git clone git@github.com:USER_NAME/RAILS_APP_NAME.git rails - Make sure the Rails and Ruby versions in your
Dockerfilematch the versions in your Rails app. - Make sure the MySQL version matches in your
fig.ymlfile. - Make sure your Rails app's
rails/config/database.ymlfile has the same user name and password as listed in thefig.ymlfile. fig up