Answer the question
In order to leave comments, you need to log in
How to organize structure of multiple machines vagrant + ansible || docker for development?
There are many articles on the topic of how wonderful vagrant, docker, etc., but most of the examples boil down to a primitive installation, setting up one machine +, at best, provisioning connections, or some very specific nuances
. In general, I want to solve such problems for myself
- to get a "standard" working environment php5.6 + nginx + mysql + redis with the ability to work on several projects (i.e. periodically add new configs for nginx and hosts) (although somewhere they write that it’s better for each project to have its own vagrant
) experimental environment php7, hhvm, (it is desirable that it can be run in parallel with the main one)
- test environments simulating production (git pull, migrations, etc.)
confuses how to resolve with ssh keys - will you have to look and register in bitbucket from each machine? or somehow you can set the "standard"
- will there be a conflict with port forwarding if you run several machines - or is it better to allocate different ports for each?
how to actually organize the structure with machines, playbooks, etc. in order not to get confused in all this, is it
possible to organize this only through dockers? (actually the main goal is to be able to save the environment to the cloud and get it from another machine)
So far, the plans are to figure it out on the local, but in the future to use the servers
Answer the question
In order to leave comments, you need to log in
Docker + docker-compose is more than enough for you.
Make images - php5.6, php7, the rest of the web is easy to find and use.
(ps you can not do it, but you'll figure it out faster)
You don't need any ssh keys in containers, make ports different if they are forwarded to the host.
Code on the host, mount in containers or add.
For development it is better to mount and work from a local folder.
Change configs in docker-compose.yml environment or env_file directives.
Backups can be directly containers or tar.gz -> docker load tar.gz container ...
For each project, in any way, 1 VM, which is very expensive if you want to work with them at the same time,
or docker container applications + containers services (nginx , mysql, redis), which can be used in different projects (php5, 7).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question