Answer the question
In order to leave comments, you need to log in
How will a php & nodejs application work in dockere?
I want to understand how docker works. I want to build an application in php (apache). But part of the requests will be processed by nodejs.
Do I think correctly that I should create 2 containers on different ports (One Apache, the second node)?
And if I want to split the application itself into modules - can I somehow store these modules in images along with the environment?
Answer the question
In order to leave comments, you need to log in
You can put everything in one container if you want. Weird, but quite workable.
You can keep a container with php + apache, and the application code in a folder nearby. Same with node.
Not necessarily on different ports, containers can not be opened to the external network at all, but then you need a reverse proxy. This is for development.
You can make a new image that inherits from php+apache and contains your application.
Then it will be enough to upload one image file to the server and run the container based on it. This is for a quick deployment. But it will be necessary to update the container and repeat the procedure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question