Gonzalo Ayuso has a new post to his site sharing some of the results of his work combining Docker, Silex, Python, Node and WebSockets, discovering how to create a complete platform with these tools.
I’m learning Docker. In this post I want to share a little experiment that I have done. I know the code looks like over-engineering but it’s just an excuse to build something with docker and containers. Let me explain it a little bit.
The idea is build a Time clock in the browser. [...] Yes I know. We can do it only with js, css and html but we want to hack a little bit more. The idea is to create: a Silex/PHP frontend, a WebSocket server with socket.io/node [and a] Python script to obtain the current time.
He then starts in on the code, first creating the WebSocket server in Node then the Python script that makes an internal request to get the time and return it. Then the Silex route is created to serve up the template for the page and the code it uses to connect back to the websocket. The post ends with the Docker configuration he used to create the Docker environment all of this lives in.