-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
single container for PaaS deployment #103
Comments
I am not familiar with cloudfoundry, but as long as it allows you to launch and link the DB and nginx containers it should work. The manual run instructions should apply: https://docs.cachethq.io/docs/get-started-with-docker#running-containers-manually I recommend using one of the tagged images from https://hub.docker.com/r/cachethq/docker/tags/ rather than latest, i.e. |
Thanks for your answer. There cannot be any nginx container there, load balancing would be taken care of by the platform. The DB can be linked (it will by a mysql though), can you think of any specific change you would do to the docker container in that case? |
Nginx in our case is acting as the webserver, not as a load balancer. |
Right, it is also not possible to have this in the current environment we're using, but it shouldn't be hard to deploy them in a single container right? I think it was actually deployed like that sometime ago. |
Would need to revisit / revert the nginx separation that was introduced in #46 - which I think is a valid move. I believe that any customizations to nginx could be done on the Cachet image itself without needing a separate nginx image, or by using a derived image (e.g. cc: |
I have similar reqs with @fdhex, 👍 for adding nginx to cachet container. |
Keeping nginx out of this docker container makes the image smaller, simpler and easier to maintain. If you really want a single cachet + nginx dockerfile why don't you just create one? That way we have both solutions. The small one without nginx and the bigger one with cachet and nginx inside a single container. That's the huge advantage of composition and small parts. Anyway you have to make sure you are able to configure nginx inside your docker container and be able to pass a custom |
I'll work on that when time allows, normally I also prefer composing services rather than having a bloated image, but sometimes it is not always possible. I will not convince anyone where I am working to use isolated docker-compose managed software remotely near production, whereas a PaaS controlled docker container works for us, and in our context we can simply not link containers, it is not an available feature. There is no need of any customization once the image is created afaik, the nginx.conf can just be put in the image and be configured to either read from env vars, or worst case I'll have an autostart script which fills it at runtime. |
Hello, My situation is somewhat similar to @fdhex. Although in our infrastructure I can run linked containers, I don't appreciate the added complexity. I have a working version by reverting the changes that were made in #46. I made some minor additions, like creating
|
I am glad that this sparked a discussion. 👍 I can see both sides of the argument here. As a maintainer, I targeted the deployment and operational use cases that I have experience with, It is tough to be 100% compatible with every single Docker provider or infrastructure out there, especially ones that do not support the "bleeding edge" Docker feature set such as linked containers in the case of cloudfoundry. I prefer to focus on new things like Docker stacks and Distributed Application Bundles (DABs) that can take advantage of the evolving Docker ecosystem and methodologies, rather than go back and change things to work around limitations of particular systems. That being said, it sounds like there are two images that are wanted by the community:
There are some problems with either approach, and I welcome any suggestions (or PR's) for ways to make both sides happy. We are sort of inbetween both of those solutions at this point, and I am open to offering both options as long as the overhead of maintaining both ways is not a huge burden. We welcome any volunteers that would like to help tackle these things. |
So I have been thinking about this, and I am leaning towards 3.4 release moving to a Alpine Linux based image, and including nginx in the Cachet image once again. A bit more monolithic, but the extra container for just nginx adds some complexity and issues. (#106) If a custom nginx or config is needed, just mount one in via a volume, or derive your own image i.e. This repo and image is really meant to be an example, and I would expect / hope that people using Cachet in Docker for critical production systems are doing their own builds in CI or their own docker hub accounts. If I was running Cahet in Docker in my own infrastructure, I would want to do some customization to the TL;DR: This is an "official" example of how to run Cachet in Docker. Administrators need to make their own decisions and modifications to fit their infrastructure needs, just as you would with a traditional server. Docker is not a "one size fits all" solution. |
I just went though the pain of covering the docker-compose in to a valid OpenShift 3.2 deployment and having the nginx and cachet all in one docker image would make it work. I have yet to see a way to share a volume in kubernetes from one pod to another pod. So having a singular image with cachet and nginx all rapped up. |
I have been able to rap all the items in to a single container image now. I am going to test this now on my Openshift 3.2 setup to see if it all works. I have gotten it work for just fine with OpenShift 3.2 / Kubernetes 1.2. Also for those wondering what the change with adding the nginx packages to the cachet contianer image the change was small a gain of 2Megs. |
I can commit my code to this project if you all want it working fine for me. |
@gamkiller77 care to share / point to your OpenShift config for Cachet? |
@sheaphillips I will do a PR this week with the base yaml files and some instructions. I just redeployed my setup on OpenShift 3.3 |
@sheaphillips PR submitted |
Thanks!
…Sent from my iPhone
On Jan 29, 2017, at 11:23 PM, Andy del Hierro ***@***.***> wrote:
@sheaphillips PR submitted
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hello,
To deploy in a more prd oriented setup, I'd like to try to deploy Cachet as a docker container on our PaaS, cloudfoundry-based. We have all sort of reliability issues when deploying with a buildpack in some environments, so I'd prefer the repeatability of a Docker container any day.
Would you suggest I try to work directly with the Cachet image here, or preferably straight from the code? I do not need (can't use) docker-compose, and anyway load balancing should be taken care of automatically by the PaaS.
Thanks!
The text was updated successfully, but these errors were encountered: