Answer the question
In order to leave comments, you need to log in
How to organize a dedicated production / production server for several projects?
Hey!
The web project is developing and VPS has become frankly missed. Therefore, it was decided to start moving to a dedicated server.
And so, there is only one dedicated server so far, and it is planned to host a web service and 2 more smaller developing web projects on it. By the way, all of them are not connected with each other and have separate databases.
Previously, the Bitrix environment on Centos was spinning on the VPS (I paid attention to it because I use tsmsk from the same Bitrix). Sometimes it made itself felt, mainly due to crooked updates.
Answer the question
In order to leave comments, you need to log in
In your case (1 dedicated server) you do not need virtualization and, moreover, Docker (it is intended for other purposes).
Install nginx + php-fpm, set up upstreams in nginx and pools in php-fpm for each project based on your needs.
For convenient deployment of applications, including those written in php, there are a lot of tools (for example , deployer.org/). Or Jenkins, if you know how to "cook" it. With it, you can also organize CI.
To prevent data loss (in the context of the database) - this is replication + regular backups. But there is one point - at least one more separate physical slave node is needed for replication. Making simple backups without replication is a guaranteed loss of data in the event of a hardware failure. For a good database, it’s better to move it to separate nodes, if possible. With this approach, it is desirable that your service provider has an internal network within the data center of at least 1 Gbps.
Something like this. As practice shows, this is quite enough for projects with a low load.
I would advise docker for your situation, the more time it is mentioned in your question, I think you know how to work with it
nginx container 1 common with forwarding all containers with php-fpm into it
But for the database, if the RAM allows, I would do that database each project in its own container
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question