Skip to content

Commit

Permalink
No more fig
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanPorta committed Oct 19, 2014
1 parent 053593d commit 1ceb3ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
6 changes: 3 additions & 3 deletions config/database.yml
Expand Up @@ -2,10 +2,10 @@ defaults: &defaults
adapter: postgresql
encoding: unicode
pool: 20
host: <%= ENV.fetch('DB_1_PORT_5432_TCP_ADDR', 'localhost') %>
port: <%= ENV.fetch('DB_1_PORT_5432_TCP_PORT', '5432') %>
host: <%= ENV['DB_PORT_5432_TCP_ADDR'] %>
port: <%= ENV['DB_PORT_5432_TCP_PORT'] %>
username: postgres
password:
password:

development:
database: verb_development
Expand Down
20 changes: 0 additions & 20 deletions fig.yml

This file was deleted.

19 changes: 12 additions & 7 deletions local-development.sh
@@ -1,11 +1,16 @@
echo "Making sure there is a local data directory at $(pwd)/data\n"
echo "Build the rails app"
docker build -t jonathanporta/verb-api .

echo "Making sure there is a local data directory at $(pwd)/data"
mkdir -p "$(pwd)/data"

echo "Creating data container with a volume mapped to $(pwd)/data\n"
docker run -d -v $(pwd)/data:/verbdata --name verbdata ubuntu echo 'verb data container'
echo "Creating data container with a volume mapped to $(pwd)/data"
docker rm -f verb_data
docker run -d -v $(pwd)/data:/verbdata --name verb_data ubuntu echo 'verb_data container'

echo "Running fig build\n"
fig build
echo "Creating database container"
docker rm -f verb_db
docker run -e "PGDATA=/verbdata/development" -d --name verb_db --volumes-from verb_data postgres

echo "Running fig up\n"
fig up
docker rm -f verb_rails
docker run -e "RAILS_ENV=development" -d --name verb_rails -v $(pwd):/home/app -p 127.0.0.1:80:80 --link verb_db:db jonathanporta/verb-api

0 comments on commit 1ceb3ef

Please sign in to comment.