-
Set
IPSTACK_API_KEY
insidedocker-compose.yml
-
Build docker container:
$ docker-compose build
-
Run migrations:
$ docker-compose run web rails db:create db:setup
-
Start up the server:
$ docker-compose up
-
Add new or update existing record:
$ curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"name":"8.8.8.8"}' $(docker-machine ip):3000/geolocations
-
Display record:
$ curl -H "Accept: application/json" -H "Content-type: application/json" $(docker-machine ip):3000/geolocations/sofomo.com
-
Delete record:
$ curl -H "Accept: application/json" -H "Content-type: application/json" -X DELETE $(docker-machine ip):3000/geolocations/8.8.8.8