Docker and Nodejs

Asked

Viewed 103 times

1

I have an application in Nodejs and need to configure the architecture of this application, I am new with Docker and need to create some containers for this application, the application must have the following configuration:

inserir a descrição da imagem aqui

-- Container 1 - Funciona como um balanceador de carga;
-- Containers 2,3,4  - Instâncias da Aplicação;
-- Container 5 - Banco de dados (Mysql);

NOTE: Possibly this architecture will receive another container to function as a reverse proxy;

I wonder if this is possible and if yes how to deploy this application later ?

1 answer

1

Take a look at the Docker Compose!

Docker Compose is Docker’s native tool for handling applications that use multiple containers.

Basically, you specify a file 'Docker-Compose.yml', which identifies which services are available and how they relate.

Then just run a command docker-compose up and he takes care of the necessary containers.

  • While this link may answer the question, it is best to include the essential parts of the answer here and provide the link for reference. Replies per link only can be invalidated if the page with the link is changed. - From Review

  • @Kennyrafael makes sense, thank you for the correction!

  • I took a look at Docker Composer and it seems satisfactory however I came up with a question, in the future this architecture will grow and become Microservices that possibly will be on different hosts yet dokcer will meet my needs ?

  • 1

    An architecture in Microservices entails other challenges. Docker Compose can be used, but it would be necessary to use complementary technologies. For example, the Docker Swarm for cluster control, Consul for discovery and health checking of the services. In short: it is feasible, but it is a much bigger challenge.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.