A
A
ADA M2021-08-19 11:21:21
DigitalOcean
ADA M, 2021-08-19 11:21:21

Is it correct to use docker in Digital Ocean in production?

Can you please tell me if you use docker containers (or maybe even swarm) on regular VPS (let's say a regular Digital Ocean droplet plan)?

In principle, if 1 project > 1 droplet, then OK. You can sharpen all configs and software versions for one project and not use docker on the production.
But I have several projects > 1 droplet, and so I thought to dockerize all of them so as not to worry about the versions on the pro.
Is this a good idea?) The stack will be php+nginx+mysql.

Also, the main question is whether it is normal to store DB data in volumes? Those. if you blunt, you can accidentally delete a volume with data, as I understand it)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2021-08-19
@adiletmurzaliev

I will describe the advantages that are obvious to me on a whim
1. The same environment on production, on test and local for development
2. Environment configuration and configs for git
3. Easy to change services (php, mysql, etc.) or run several different versions
On production it is recommended to use volumes on local mapping, you can accidentally delete /var/lib/mysql as well, as they say with dope you can and h ... break.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question