Skip to content

More detailed example for the nginx sidecar use case #2674

Answered by efekarakus
vkuts asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vkuts !

Fargate tasks use the awsvpc network mode. This means that the other containers will be accessible via localhost. So I think if you update the config like this:

http {
  # ...
   upstream frontend {
    server localhost:8080;
  }
  
  server {
  listen 80;

  location ~ ^\/api($|\/) {
    proxy_pass http://localhost:8080;
  }
}

It should work 🤞 !

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vkuts
Comment options

@efekarakus
Comment options

Answer selected by vkuts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants