TheOneCurly

joined 1 year ago
[–] TheOneCurly@kbin.social 1 points 1 year ago (1 children)

Ah ok I think I see some of the confusion. Docker networking is a little weird and imo compose abstracts a little too much away.
If 2 containers are on the same docker network they are exposing all their internal ports to each other with individual virtual network adapters. This is really nice because there's no issues with port overlap, each container has its own hostname and virtual adapter with all ports available.

The port mapping actually binds the internal port of the container to the port on your host. This is useful for applications outside of docker to connect directly, but not necessary for anything you want behind the reverse proxy anyway.

[–] TheOneCurly@kbin.social 1 points 1 year ago (4 children)

Repost from kbin directly since federation is being weird.

I use a similar setup with dockerized NPM. I see 2 things in this example that I do differently.

  1. Make sure to explicitly call out external: true in the network definition. I'm not sure what compose will do if you don't. But I wouldn't want it making any new proxy networks accidentally.
  2. proxy should be in the networks list for each container you want accessible from NPM. I don't believe just defining it in the compose adds all containers to that automatically.
[–] TheOneCurly@kbin.social 3 points 1 year ago (1 children)

You create an account with the express purpose of posting inflammatory nonsense and then cry to the mods to save you from the consequences of your own actions?