- To run:
service/bin/www
- http://localhost:3000/hotels
- You must set API_KEY environment variable to your Google API key.
- It should pick up proxy settings from http_proxy
- Latest version not running there yet
- A stub is running here: http://104.198.132.115:8080/
scripts/buildit
: Builds the docker imagedocker images
: list imagesdocker rmi <image id>
: remove imagedocker run -p 3030:3000 -d <image id>
: Run image mapping private port 3000 to public (external) port 3030docker ps -a
: show all running containers
google-cloud-sdk/bin/gcloud init
: initialize SDK
-
scripts/pushit
: Tags and pushes the docker image to my docker registry in GC. If it hangs and can't ping the repo server then likely it's a proxy configuration issue with docker (on the Mac I had to set proxies using Docker preferences). -
To deploy, go to your Kubernetes Console, click on Conainer Clusters, the click "Connect" for your cluster and follow the instructions to start a local admin dashboard for your cluster
-
Then you can go to http://localhost:8001/ui
Click Pods then Create (in the upper right). To get your image URL you will need to go to the Container Engine Console click on the image in your Registry and click "Show pull command". It will look something like: us.gcr.io/ecstatic-magpie-152317/server.js:v2. And don't forget to mark the service as external and map your incomming port (Port) to the port the container's port (Target Port)
After provisioning click on Services and you should see an External endpoints
-
Get a key you can do so using your projects API Console
-
Put key in request. Request looks like:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&type=lodging&rankby=distance&key=YOUR_API_KEY
- Places Web Service Documentation
- google-maps-services-js : Github repo for Node.js client
- We're not using this due to proxy issues
- Docs for Node.js google map client