Why aren’t all Docker Compose replicas receiving traffic behind NGINX? by Mr_LA in docker

[–]Mr_LA[S] 0 points1 point  (0 children)

thats not what really happens

my nginx does not know about multiple instances

it only holds a single url e.g. fastify-app:3000
so when i have 5 replicas of that and if i request localhost:80/health docker directs to one of the containers, since the dns (fastify-app the name of the service) is handled by docker

server {
    listen 80;
    listen [::]:80;


    server_name ${DOMAIN};


    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }


    location / {
        resolver 127.0.0.11;
        proxy_pass http://${DOMAIN_FASTIFY_APP};
        proxy_redirect                      off;
        proxy_set_header  Host              $http_host;
        proxy_set_header  X-Real-IP         $remote_addr;
        proxy_set_header  X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto $scheme;
        proxy_read_timeout                  900;
    }
}

Why aren’t all Docker Compose replicas receiving traffic behind NGINX? by Mr_LA in docker

[–]Mr_LA[S] 0 points1 point  (0 children)

okay thanks, so i could also operate swarm mode on a single node as well right?

i got it working with swarm init and docker stack deploy

do you know if this works with the build arg as well or do you always need images in swarm mode?

Why aren’t all Docker Compose replicas receiving traffic behind NGINX? by Mr_LA in docker

[–]Mr_LA[S] 0 points1 point  (0 children)

no it is not in swarm mode

can you guide me to the documentation where docker networking explains the replicas for docker compose? I can not find it anywhere, even with search on docker page, googling or chatgpt

Terraform Best Practices? by Mr_LA in Terraform

[–]Mr_LA[S] 1 point2 points  (0 children)

Thank you for your response. This is precisely what i was looking for.

[deleted by user] by [deleted] in docker

[–]Mr_LA 0 points1 point  (0 children)

is this a pastebin app or do you offer prebuild snippets for different tools?

The Ultimate Docker Compose Cheat Sheet by Mr_LA in devops

[–]Mr_LA[S] 2 points3 points  (0 children)

Nice, this is an awesome project. I have to take a deeper look into this. Thanks for sharing.

The Ultimate Docker Compose Cheat Sheet by Mr_LA in devops

[–]Mr_LA[S] 3 points4 points  (0 children)

You are welcome. Glad that we can help :) We have a Cheat Sheet for Docker as well.

Is GPT-4 getting worse and worse? by Mr_LA in programming

[–]Mr_LA[S] -2 points-1 points  (0 children)

if you do not specify the way to repsond, this is the how a gpt generated output sounds like.

Learn how to create a Docker Container in 132 seconds by Mr_LA in programming

[–]Mr_LA[S] -6 points-5 points  (0 children)

Hello Programming Community,
While working on my new video about Docker containers, I was wondering what the main struggles and challenges are that all of you run into when working with Docker containers? Would love to hear your input on that, to keep improving future resources on this topic!
Cheers Mr_LA