$ git clone [email protected]:hthompson6/bookstore.git && cd bookstore/scripts
$ ./install.sh
$ cd /path/to/bookstore/docker
$ sudo docker-compose up -d --build
$ cd /path/to/bookstore/docker
$ sudo docker-compose down -v
- Please note that it can take some time for the Nginx service to start fully. A 502 bad gateway response may be returned at first.
- Book IDs are created server side and are read-only
The REST API can be interacted with via a WebUI found at the http://<ip_host>/api/book
$ curl -d '{"author":"test_author", "title":"test_title", "pub_date": "2019-01-01"}' -H "Content-Type: applicatin/json" -X POST http:<host_ip>/api/book
{"book_id":1,"author":"test_author","title":"test_title","pub_date":"2019-01-01"}
- Note the endpoint hit is
http://<host_ip>/api/book
$ curl -d '{"author":"new_author", "title":"new_title", "pub_date": "2019-02-01"}' -H "Content-Type: application/json" -X POST http://<host_ip>/api/book/1
{"book_id":1,"author":"new_author","title":"new_title","pub_date":"2019-02-01"}
- Note the endpoint hit is
http://<host_ip>/api/book/<book_id>
$ curl http://<host_ip>/api/book
$ curl http://<host_ip>/api/book/<book_id>
$ curl -X DELETE http://<host_ip>/api/book/<book_id>
$ cd /path/to/bookstore/scripts/
$ ./uninstall.sh
- Add unit tests
- Utilize ssl certs and enforce https
- Shift to Kubernetes:
- Utilize docker hub or local registery (depending on resource)
- Leverage the nginx ingress controller instead of nginx docker image
- Prometheus monitoring
- etc.
- Jenkins/CI tooling