@switzerly
shelbyswitzer.com
{
"business" : {
"name" : "Hairy Convenience",
"lat" : "33.760094",
"lng" : "-84.386037",
"bustype" : "convenience"
}
}
document:
mapping:
{
"business" : {
"properties" : {
"name" : { "type" : "string" },
"lat" : { "type" : "string" },
"lng" : { "type" : "string" },
"bustype" : { "type" : "string" }
}
}
}
gem 'stretcher'
gem 'remote_table'
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/api-in-a-box
ports:
- "3000:3000"
links:
- elastic
elastic:
image: dockerfile/elasticsearch
ports:
- "9200:9200"
- "9300:9300"
volumes:
- docker_volumes/elasticsearch_data:/usr/local/elasticsearch/data
docker-compose.yml
$ docker-compose up -e DATA_URL="https://api.github.com/repos/switzersc/food-data"
$ curl http://localhost:4567/resources?type=business&dedupe=name
{
"resources" : [
{
"name" : "Bob's Convenience Store",
"lat" : "33.760094",
"lng" : "-84.386037",
"bustype" : "convenience"
}
]
}
@switzerly
shelbyswitzer.com
https://www.docker.com/
http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
http://amundsen.com/media-types/collection/
https://www.data.gov/developers/apis