Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

209
Visualizações
Elastic Beanstalk - Docker/Flask App - 502 Gateway Error

I am creating a simple Docker/Flask app that I wanted to deploy to elastic beanstalk but am unable to get it working.

The code for the backend app (including docker config) can be found here: https://github.com/rogebrd/sage/tree/move_to_docker/backend

For code deployment, I am pushing my code to s3 via a zip; script to do that can be found here: https://github.com/rogebrd/sage/blob/move_to_docker/scripts/bundle_to_zip.sh

The Elastic Beanstalk instance is pretty much in it's default configuration (only thing I changed was enabling logs)

  • setup using Docker running on 64bit Amazon Linux 2/3.4.9

The error I am getting when I hit the resource is - 502 - Gateway Error

Looking in var/log/eb-docker/containers/eb-current-app/stdouterr.log I am able to see the app is successfully spun up listening on port http://192.168.0.2:5000/

At this point, I don't really know where the issue could be originating from. My suspicion is that the ports aren't properly being mapped to which I have tried the .ebextensions that are in place now, using a Dockerrun.aws.json file instead of docker-compose, removing docker-compose entirely, and changing the server port to 8080 and 80 with no success.

Looking for any resources to point me in the right direction!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You are using wrong ports in docker compose. Please change to:

    ports: [ '80:5000' ]
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda