Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

[WIP] Dockerize #38

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open

[WIP] Dockerize #38

wants to merge 3 commits into from

Conversation

mathewpeterson
Copy link

@mathewpeterson mathewpeterson commented Aug 6, 2017

Here is a quick example of how I have dockerized a Symfony application in the past.

My approach tries to adhere to the best practices for each component. E.g. send all logs to stdout, use environment variables (from 12factor.net), use of docker-compose.override.yml, etc.

Again, please do not feel obligated to use any of this but feel free if it's something you find value in.

If you do approve of this approach, I can keep working on this PR and add documentation as well as any additional things you may want. I will also try and stay in the project Gitter if you want to communicate with me there.

/cc: @lynxluna @bepitulaz

@lynxluna
Copy link

lynxluna commented Aug 6, 2017

Nice! This one is a lot better than my approach. My experience was mostly dealing with Go or Java apps. Admittedly, dockerising php is not as easy as I've thought. This one helps us immensely. I've learnt a lot by reading your commits.

My concern is only that the base images are based on debian, is it possible to shave size by switching into alpine linux? Not a very big deal, but I kinda leaning towards lightweight stuff.

I think this is the way we should go, @mathewpeterson has done a better approach than mine. +1 for this one. What say you, @bepitulaz ?

What Say You

@bepitulaz
Copy link
Member

Hi @mathewpeterson @lynxluna,

I think @mathewpeterson 's approach is better and also all the parameters have been moved to environment variables. I think we can go ahead by using this PR. Shall we merge it now or later?

@mathewpeterson
Copy link
Author

@lynxluna, @bepitulaz Good to hear that you like this approach. I can continue working on it.

@lynxluna Regarding alpine images: I do not have an alpine image as there is always at least one project that runs debian/ubuntu in my data center. And with how Docker/AUFS handles the filesystem (copy on write) there is no increase in storage once you have the image local. My suggestion is that we use the current image and if there's enough support by it, we can work on getting an alpine image created.

@bepitulaz There are some more things that I would need to add, e.g. documentation and maybe a Makefile in order to steamline things for new folks. There is also an assumption made with the configuration with regards to how the networking works: It expects some additional third party docker containers to be running in order to route the request via dns. I am not really sure how to solve this properly besides just using ports instead of dns.

@lynxluna
Copy link

lynxluna commented Aug 8, 2017

@mathewpeterson yes, let's go with the debian one and re-iterate later on. I would love to know how to setup the docker_public network. Is that just created using docker network or there're other configurations needed?

@mathewpeterson
Copy link
Author

@lynxluna Like I said, I think there's work for me to remove this as a dependency. Currently, it uses this little project that I created a while ago: https://github.com/mathewpeterson/my-docker-environment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants