Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
add a setup script using docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mattr- committed Jun 8, 2019
1 parent 5d81765 commit a1d8758
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions script/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

appdir=$(cd "$(dirname "$0")/.." && pwd)

docker-compose run -d db

# Create the databases
docker-compose run db mysqladmin -h localhost -uroot create janky_development
docker-compose run db mysqladmin -h localhost -uroot create janky_test

# Create the tables
docker-compose run app bin/rake db:migrate
docker-compose run -e RACK_ENV=test app bin/rake db:migrate

docker-compose run app bin/rake db:seed


docker-compose down


0 comments on commit a1d8758

Please sign in to comment.