Here it is running on the bare metal linux mint install.
We’re going to run it in minikube.
First, containerizing the angulars
Got the angular app up and running with this Dockerfile
https://mherman.org/blog/dockerizing-an-angular-app/
With the frontend running in a container, and the flask backend and rabbitMQ running on bare metal, everything is working as expected.
Then, containerizing the flasks
This was pretty slick, but didn’t work with my code:
https://medium.com/@greut/building-a-python-package-a-docker-image-using-pipenv-233d8793b6cc
This image buidls successfully: https://github.com/fdhadzh/flask-pipenv-example
I made a rookie mistake: I decided to upgrade to python3.7 from python3.5 halfway through figuring this out. When I did this, I had to delete Pipefile.lock, which meant I needed to rebuild it with a pipenv install
before building the container, at which point a bug in pipenv bit me.
Installing the latest pipenv, which has the fix, worked, and I was able to build the image:
|
|
docker exec -it thecontainer /bin/bash
curl -X POST localhost:8000/command -H “Content-Type: application/json” –data “{"command":"value"}”