All aboard the container ship and anchors away! Let's set sail for adventure.
You don't need a CSA certified floatation device for this trip, but a little preparation is sure to help.
To get the most from the workshop you'll want to download and install:
- Docker
- Sublime Text (or some other editor of your choice)
- Git
That's all you need to do before hand. The rest we'll cover in person.
Sure, that's great, but what's in this repo?
Great question, I'm glad you asked. This repo has three branches:
- master - a Python Flask app
- Dockerfile - the above flask app wrapped into a Docker image
- DockerCompose - a further extension with a docker compose file so we can use docker-compose
The Flask app is a simple service that has two endpoints and three actions
The first returns the Fibonacci number for a given index, n. i.e. Fib(4)=3, where Fib(0) = 0:
- GET /fib/<int n>/
It also does some super useful things, like tell you if some value m is the n th Fibonacci number:
- POST 'application/json' {"value": <int m>} /fib/<n>/
Or, whether m is a fibonacci at all:
- POST 'application/json' {"value": <int m>} to /fib/
We'll be taking this service, dockerizing it, and then connecting it to a docker instance of redis. This will give us the opportunity to see how docker works, and then touch on how docker compose makes life just a little easier.
The accompanying slides for this workshop are here