Update Docker docs

This commit is contained in:
wvengen 2015-05-02 14:26:15 +02:00
parent c0ae816c77
commit ca1abefeb6
2 changed files with 11 additions and 6 deletions

View file

@ -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 foodsoft project from the git repository. Now you are only a few steps away
from trying it out and then jumping into development. 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**: **System requirements**:
[RVM](https://rvm.io/rvm/install), [RVM](https://rvm.io/rvm/install),
[Ruby 1.9.3+](https://www.ruby-lang.org/en/downloads/), [Ruby 1.9.3+](https://www.ruby-lang.org/en/downloads/),

View file

@ -1,6 +1,6 @@
# Foodsoft on Docker # 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 ## 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 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 ## Usage
Start containers (in foreground, stop them with `CTRL-C`) Start containers (in foreground, stop them with `CTRL-C`)
@ -40,6 +37,10 @@ Open a rails console
docker-compose run app rails c 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 Run the tests
docker-compose run app ./bin/test docker-compose run app ./bin/test
@ -64,5 +65,5 @@ docker commit -m "Updated rails" <Container ID> foodsoft_app
### Database configuration ### Database configuration
TO make thins easier we use the ENV Variable DATABASE_URL. But to make this To make this easier we use the environment variable `DATABASE_URL`
work, the shouldn't be any config/database.yml file! (and `TEST_DATABASE_URL` when using the testing script).