If Docker for a personal vps with self-hosted projects?

Hello! Have a personal VPS on Debian, which turns a whole zoo of different software. But me and a couple man no one uses them, so about any load distribution of the question; the goal is to save time when migrating between vps hosters (Hello Igor and masterkhost), given that backups the DB and so do, raises only the question to deploy the software:
- NextCloud - PHP7, FPM
- YOURLS (sokraschatel links) - PHP7, FPM
- another website on a very old version of Bitrix - PHP5, FPM, outdated plug-ins from third-party repositories
- a few pet-projects Flask - Python3, UWSGI, Redis
- and on NodeJS
- MariaDB
- Nginx, throwing requests with subdomains at all this toapr, + Certbot for SSL
- a few static pages, Nginx outstanding directly-om
- several tasks in crone and demons systemd

How suitable for this Docker? I can't imagine how all the above can be dragged out to the containers, that has not turned out a complete mess
And if not suitable, then what to use? The option "just a bash script that configures all" left in case of emergency
April 19th 20 at 12:44
1 answer
April 19th 20 at 12:46
How suitable for this Docker?

it is quite suitable

I can't imagine how all the above can be dragged out to the containers, that has not turned out a complete mess

and what's the problem?

- NextCloud - PHP7, FPM
a separate folder with docker compose, which will start the containers of this project

- YOURLS (sokraschatel links) - PHP7, FPM
a separate folder with docker compose, which will start the containers of this project

etc.
...

- Nginx, throwing requests with subdomains at all this toapr, + Certbot for SSL
well nginx can write to outside requests to the appropriate containers to pass
I don't quite understand what is obtained is the point in the Docker, if there is no independence of the containers? For example, nginx would have to pass volum-s for the return static and php-fpm correctly processed the requests from nginx, the path to the script inside the container must match exactly with the path to the volum-from the outside. At this stage, get some cereal - Abbey95 commented on April 19th 20 at 12:49
Well, first -
to nginx would have to pass volum-s for returns static

on the contrary - the folder with the statics must be mounted in the right containers - well I hope you the data in the container store?

to php-fpm correctly processed the requests from nginx
the path to the script inside the container must match exactly with the path to the volum-from the outside.

using redirects and aliases in the settings of nginx that's all very well to resolve.

Secondly, in some cases in the project, add a container of Mincom, where to resolve all the static and stuff, and your system nginx wraps requests in ssl and proxies requests there outside - aubree commented on April 19th 20 at 12:52
@aubree, thanks for the answer)
you the data in the container store

I incorrectly expressed - meant not much, and the statics of the site (css, js, png), + again, to work php-fpm need to nginx saw the structure of the site. But the option of individual container + common nginx for ssl seems to me more logical)

In General, the meaning of such words, in the context of the task "to move VPS to another hosting provider" what do you think? Or is it still "just a bash shell script that configures everything" will be better? - Abbey95 commented on April 19th 20 at 12:55
@Abbey95,
In General, the meaning of such words, in the context of the task "to move VPS to another hosting provider" what do you think? Or is it still "just a bash shell script that configures everything" will be better?


From my point of view - makes sense. Besides, in reality, in the development of projects - the team of programmers you need to deploy those environments at home. And someone MacOs, someone Linux and some on Windows. The use of Docker this makes it much easier.
Plus - greatly simplifies the process Continuous Integration and automated testing in the project. - aubree commented on April 19th 20 at 12:58

Find more questions by tags DevOpsDockerSystem administrationHostingLinux