emoncms/emoncms-docker

Using emoncms-docker.

pb66 opened this issue · 1 comments

pb66 commented

Continued from emoncms/emoncms#540

(I hope you don't mind me answering here, I can move it to the forum if you prefer)

no I haven't yet tried emoncms-docker, I am not familiar with docker and how it works, I would like to try it, but not on my live server, yet!

I understand from very basic knowledge that the concept behind docker is to compartmentalize, but I would need to run it on a test instance first, until I was familiar and had confidence in it. reading the guide it is still unclear to me how it is structured, for example it says

"We have taken a multi-container approach with php-apache running in one container and the MYSQL database running in another. The containers are linked using docker-compose."

Does that mean each of the individual emoncms instances each have php-apache and mysql containers? or do they share those same 2 containers? are those containers in addition to any existing live LAMP? Is the data and tables kept separate for each instance? How does traffic get directed? I currently use "https://myserver" rather than "https://myserver/emoncms" so how could that work?

Plus, for a test setup how would I configure port forwarding? could I redirect all non-live traffic from my live server to a docker test server until I am happy to combine them?

As much as I think it COULD be a great tool, I do not know that for sure and cannot tell from the guide if the "in minutes" installation would suit my needs unchanged and unfortunately at the moment I do not have the time for a long steep learning curve in Docker to adapt it if it doesn't, as you know my application is quite different from the single home emonPi user.

I think I need more Pi's setup, I should really setup a good VM environment, but it's the same issue of finding the time to research, audition and learn about VM setups.

I have also replied on the https://community.openenergymonitor.org/t/emoncms-dev-in-a-browser-using-cloud9-ide/1756 forum thread, mainly in response to

"Off-topic: I woul really like to create a testing enviroment as part of the emoncms-docker which automaticlly loads in a decent amount of test data and some complex dashboards at launch for testing and also a service to hit the API hard with a large volume of incoming data. However this is not the righ location to discuss this...."

Hi, you are correct in your understanding about the multiple containers but it would not be in addition to anything running on the host - it all runs in containers co-ordinated by docker compose. This multi container approach which Glyn posted originally is well suited to running an emoncms.org website as you can scale the different constituent services individually which is good for load balancing. For running a local emoncms instance on an SBC (such as on an emonPi) a single container approach (basically a LAMP stack in a container) is arguably more appropriate (less duplication) and I am currently in the process of setting this up now.

I think it is quite early days with emoncms docker development and would certainly benefit from people trying it out. The great thing is that you can run it alongside what you are doing already and just map the server to another port on the host.