diff --git a/doc/SETUP_DEVELOPMENT.md b/doc/SETUP_DEVELOPMENT.md index c011f5db..1e507c32 100644 --- a/doc/SETUP_DEVELOPMENT.md +++ b/doc/SETUP_DEVELOPMENT.md @@ -5,6 +5,10 @@ Gratulations, if you read this file locally, you have successfully cloned the foodsoft project from the git repository. Now you are only a few steps away from trying it out and then jumping into development. +This document describes how to setup Foodsoft for development on your local system. +Alternatively, you [run Foodsoft using Docker](SETUP_DOCKER.md). + + **System requirements**: [RVM](https://rvm.io/rvm/install), [Ruby 1.9.3+](https://www.ruby-lang.org/en/downloads/), diff --git a/README_DOCKER.md b/doc/SETUP_DOCKER.md similarity index 82% rename from README_DOCKER.md rename to doc/SETUP_DOCKER.md index 25ae242d..f886e316 100644 --- a/README_DOCKER.md +++ b/doc/SETUP_DOCKER.md @@ -1,6 +1,6 @@ # Foodsoft on Docker -This document explains setup and using docker the foodsoft with docker. +This document explains setting up and using Foodsoft with Docker. ## Requirements @@ -23,9 +23,6 @@ to be pulled from docker registry and a lot dependencies needs to be installed.) docker-compose run app rake foodsoft:setup_development -TODO: Right know this is not gonna work because of the new database -configuration via ENV variable. See Notes below. - ## Usage Start containers (in foreground, stop them with `CTRL-C`) @@ -40,6 +37,10 @@ Open a rails console docker-compose run app rails c +Setup the test database + + docker-compose run app rake db:setup RAILS_ENV=test DATABASE_URL=mysql2://root:secret@mysql/test + Run the tests docker-compose run app ./bin/test @@ -64,5 +65,5 @@ docker commit -m "Updated rails" foodsoft_app ### Database configuration -TO make thins easier we use the ENV Variable DATABASE_URL. But to make this -work, the shouldn't be any config/database.yml file! +To make this easier we use the environment variable `DATABASE_URL` +(and `TEST_DATABASE_URL` when using the testing script).