Why Run Docker OpenEMR Container in Cloud?

installation
question

(Jerry P) #1

Now I have nothing against running OpenEMR in the cloud per say but, my problem arises as to the need to run as a single instance of OpenEMR in a docker container. Why use docker and not simply set up and run OpenEMR in a Ubuntu EC2 instance? I keep pondering this to find definitive advantages and get on board but it seems, i’m still buying the ticket. For me docker is great for development or running clusters of applications but for a single instance, the advantages elude me.

So, I hope to be educated and maybe this thread will prove useful to others having the same questions. Also, user experiences and did the cost for the service meet expectations.


(Robert Down, BSN, RN) #2

The entire app is not contained in 1 docker, the docker-compose creates volumes for the database as well as web server. This adds an additional layer of security as access to the database is restricted to the private network that Docker creates. Plus it eases the installation and upgrade processes. My 2 cents


(Jerry P) #3

Hm, but docker is a container running in a container ie a virtual machine running a separate os(alpine) within a ubuntu running container. In the end docker is sharing resources with the AWS instance based on the resource allocation to the EC2 machine, right?
What makes this anymore secure then running a t2 w/o docker? Both have the same exposure to the internet and maybe the docker adds another level to accessing the OpenEMR image via terminal but still.
Still don’t get how docker makes upgrading easier in a production sites especially for those whom have custom code or modification one offs. For instance, maybe an explanation of how an upgrade process would work for a production site compared to a normal upgrade. What makes docker any easier than simple unzip?


(Robert Down, BSN, RN) #4

Maybe @jesdynf would know a bit more about the specifics of AWS resource allocation :man_shrugging:


(Jerry P) #5

I think I understand how resources are allocated which really isn’t my concern here but more so, why bother with the worry of resource sharing with a docker container in the first place.


(Asher Densmore-Lynn) #6

I mean, if you frontload the discussion with the “worry” of the Docker, yes, it’s not going anywhere. The Docker container represents a fully-configured OpenEMR instance in a known state we can troubleshoot. Everything’s exactly where I put it, and anyone familiar with the Dockerized image can support any install of the image, regardless of the conditions on the host.

There’s people this isn’t valuable for, and that’s fine.


(Jerry P) #7

wow, sounds nefarious. I started this thread to help define why and to whom this solution is a viable resource for production sites and what the implications are or could be.

Exactly and that’s one of the points i’m trying to get defined. What cases aren’t a good fit for this solution? Also, ramifications for upgrades/patches.

This makes good sense, thanks for that.


(Robert Down, BSN, RN) #8

I don’t think Asher is trying to be nefarious. If you are a career sysadmin with expertise in PHP, MariaDB, and Apache then I would agree with Asher that’s you probably don’t need the Docker. But I imagine a lot do our user base doesn’t have that level of expertise. Having a turn key solution that you lowers th barrier to success for non-experts is a net positive. It does make troubleshooting a lot easier as well as we know the exact state of the machine,

I see it similar to how package managers are used. Do you NEED one? No. Does it simplify life by using one? Nearly every time. Or like compiled code. Do you need the executable? No, you can always download from source and manually compile using gcc (or whatever). Does having an executable make life easier? Yep.

I guess my position then becomes if you are a master sysadmin, eh, take it or leave it. If you are anybody else it’s probably a way easier solution, you don’t have to manage your PHP installs, your database installs, your web server installs, or configuration, etc, it just works.


(Ryan Nix) #9

@sjpadgett The best bet would be to run OpenEMR on a Docker/Kubernetes platform like OpenShift. Redhat OpenShift is probably the best way to run Docker containers, in my opinion. OpenShift.com has a free tier too. Check out https://www.youtube.com/watch?v=82VbMo77fWQ to see how easy it is to deploy a PHP/MySQL application. All of the Docker/Kubernetes stuff is completely abstracted so you can just deploy OpenEMR as easily as can be.


(Robert Down, BSN, RN) #10

I think the question isn’t where to run Docker, but why


(Ryan Nix) #11

I understand he is asking why run it on Docker, and he makes some good points on why Docker isn’t necessarily better by itself. I run two Discourse sites, and not only do I have to maintain Discourse, but I have to maintain the VMs that run the Docker images. e.g., updating the Docker daemon, rebooting the VM to run the latest kernel AND running apt-get autoremove to clean out the old Ubuntu kernels. This is tedious, and it takes away from just running your application. So while the benefits to running your application in a Docker container are great for portability, configuration consistency, etc, the underlying infrastructure is somewhat burdensome. That is why OpenShift is great because @sjpadgett can fork the OpenEMR repo then deploy to OpenShift in a fairly quick manner without worrying about the underlying system maintenance. Putting together a “How to deploy OpenEMR on OpenShift” has been on my bucket list for a while. I’ll try to put together something soon.