B
B
bernex2016-08-05 10:41:26
Node.js
bernex, 2016-08-05 10:41:26

How to make true Docker and use it for NodeJS application?

A bundle is planned: nginx (proxy) + ssl + node.js
How to run it through docker right?
3 projects are planned on the server: 2 node, 1 php.
And so that if the load on one increases, others do not fall, separate the resources by cores.
How to do it right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-08-05
Protko @Fesor

How to do it right?

hire a devops with docker experience?
So all the same in different containers, you can allocate resources through cgroups to each container so that at least a little bit more remains. Well, again, in which case, nothing prevents you from transferring containers to other servers.
you will have:
- 1 nginx container
- 2 node.js containers (one for each application)
- 1 php container (if there is cron, etc. it makes sense to have another container for it)
- 1 database container ( or 3 if everyone needs a base)

D
Dmitry Belyaev, 2016-08-05
@bingo347

Container for nginx with export of port 80 and import of application ports, it is better to allow all cores, we also forward all folders with static inside
Container for the database (if any) with export of its port
By container for each application, here the settings depend on the application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question