From ac7daafb80ea0f18d790497fe0ba0cdc32c0dfc7 Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Tue, 24 May 2016 07:18:36 -0400 Subject: [PATCH] Docker instructions include fetching, committing seed data. --- Dockerfile | 2 +- docker-compose.yml | 8 ++++++++ docker/README.md | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f8d54ef95..a05ce0a65e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ruby:2.2.2 RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - && \ - apt-get install -y nodejs && \ + apt-get install -y nodejs postgresql-client && \ npm install -g lineman COPY Gemfile Gemfile.lock /exercism/ diff --git a/docker-compose.yml b/docker-compose.yml index 280f4403f7..9788161fba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,14 @@ app: ports: - "${EXTERNAL_PORT}:4567" environment: + # These will ensure that certain development commands which + # use 'psql' will also include our custom user and password. + # + # For more information, see: + # http://www.postgresql.org/docs/8.4/static/libpq-envars.html + PGUSER: exercism + PGPASSWORD: apples + RACK_ENV: DEV_DATABASE_HOST: db db: diff --git a/docker/README.md b/docker/README.md index b42c468865..4ca7ad9a7f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -71,7 +71,7 @@ Then run: This will take a little while as a few Docker containers are built for you. Once it's finished, run: - docker-compose run app rake db:migrate + docker-compose run app rake db:seeds:fetch db:reseed Now your database is set up. To get the site up and running, run: