An example of how to isolate a docker container from outside influence
Node was used to implement two applications: appA
and appB
. When opening the appA
page, data from appB
will be requested
- Application
appA
forwards port3000
to the outside and becomes accessible from the outside - theglobal_network
network is used - The
appB
application has port3001
, but does not forward the port to the outside
Applications appA
and appB
are on the same local_network
, so they can communicate with each other by name
For example appA
accesses appB
at: http://appB:3001
Repositiory uses docker-compose to build:
docker compose up -d --build
To open the page need to get SERVER_IP
where containers are located and follow the link:
SERVER_IP:3000