Use docker-compose
docker-compose up to start the different services in the docker-compose.yml file
First time use
docker-compose run web bundle exec rails db:createdocker-compose run web bundle exec rails db:migrate
Mac needs a virtual environment, here using docker-osx-dev. Because vagrant was not stable enough for syncing files. run
curl -o /usr/local/bin/docker-osx-dev https://raw.githubusercontent.com/brikis98/docker-osx-dev/master/src/docker-osx-dev
chmod +x /usr/local/bin/docker-osx-dev
docker-osx-dev install
Add eval "$(boot2docker shellinit)" to your ~/.bashrc file, this will give you dockerhost hostname
in the root folder docker-osx-dev this will sync the files from host machine to guest VM
in a new tab run docker-compose up