You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The section about Docker networks in the Advanced Configuration suggests to replace the default network in each compose with a network shared with NPM. This can lead to strange issues like this one where multiple instances of redis clashed because they were in the same network, affecting users of NPM, caddy and traefik alike. Additionally, all containers in this network can reach all other containers.
A preferred solution would be to only add front-end services to the shared network, and leave all backend services in the respective default networks created for each compose file. Two situations arise:
There is only one service in the compose. We can simply append the network: snippet as already suggested to replace the default network:
networks:
default:
external: truename: npmnet
If there is more than one service, append this snippet instead:
networks:
npmnet:
external: true
and add the following snippet only to the front-end service (or adjust the existing one), leave all other services as is:
networks:
- npmnet
- default
(replace npmnet with the name of the shared network)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The section about Docker networks in the Advanced Configuration suggests to replace the
default
network in each compose with a network shared with NPM. This can lead to strange issues like this one where multiple instances of redis clashed because they were in the same network, affecting users of NPM, caddy and traefik alike. Additionally, all containers in this network can reach all other containers.A preferred solution would be to only add front-end services to the shared network, and leave all backend services in the respective
default
networks created for each compose file. Two situations arise:network:
snippet as already suggested to replace thedefault
network:and add the following snippet only to the front-end service (or adjust the existing one), leave all other services as is:
(replace
npmnet
with the name of the shared network)Beta Was this translation helpful? Give feedback.
All reactions