Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
053593d
commit 1ceb3ef
Showing
3 changed files
with
15 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |