B
B
bamond2016-05-24 16:55:42
Docker
bamond, 2016-05-24 16:55:42

What is the best way to set up docker?

Good afternoon.
Share your experience, what is the best way to use docker on the web?
we have... nginx , php-fpm , memcache , sphinx and CODE ... for example, such a bunch...
Each service is a separate container with linking (for example, fpm links to nginx ) ... everything seems to be simple here.
But the question arises where, according to best practice, the code should be located, how to link or mount?
On the one hand, you can probably put it on the host machine and mount it as a folder into containers. But here there is a desire to have a bare server with a docker and keep EVERYTHING in containers, is this approach wrong?
On the other hand, put the code into the php-fmp container and, in case of a puff update, immediately test the code in the container and pour the ready-made container onto the product (Code + updated puff). Where containers with nginx are already spinning, etc.
Here we get the plus that the container with the code can be easily moved between the servers of the developers and the product.
Or is the best practice in docker to put ONLY services into containers and, in case of a puff update, replace the container with it without touching the files with the code?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
spotifi, 2016-05-24
@spotifi

best practices - put all programs in separate Docker containers.
say, on CoreOS you will not be able (except through one place) to host applications otherwise than through many Docker containers.
In the case of a specific PHP application, your php files can be treated as static data for a PHP web application and put into a container along with the PHP engine itself and its modules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question