Skip to content

Commit

Permalink
Add commands to build&deploy container with Makefile. (#2746)
Browse files Browse the repository at this point in the history
  • Loading branch information
icarito authored and jywarren committed May 25, 2018
1 parent c62f7f7 commit 6614c9e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
build:
cp config/database.yml.example config/database.yml
cp db/schema.rb.example db/schema.rb
docker-compose down --remove-orphans
docker-compose build

deploy-container:
docker-compose run web sleep 5
docker-compose run web rake db:migrate
docker-compose run web bower install --allow-root
docker-compose run web bower update --allow-root
docker-compose run web rake assets:precompile
bash -c "test -e tmp/pids/server.pid && rm tmp/pids/server.pid"
docker-compose up -d
docker-compose exec -T web bash -c "echo 172.19.0.1 smtp >> /etc/hosts"

install-dev:
echo "Installing RubyGems"
bundle install --without production mysql
Expand Down

0 comments on commit 6614c9e

Please sign in to comment.