- Install docker
- Build containers
docker-compose build
- Migrate database
docker-compose run app bundle exec thor db:migrate
- Launch containers
docker-compose up
- Test shorty
curl -i -X POST -H 'Content-Type: application/json' -d '{"url": "http://example.com", "shortcode": "123456"}' localhost:9292/shorten
curl -i localhost:9292/123456
curl -i localhost:9292/123456/stats
- Migrate test db
docker-compose run -e RACK_ENV=test app bundle exec thor db:migrate
- Run tests
docker-compose run app bundle exec rspec