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

380
Visualizações
Celery Flower NGINX reverse proxy for review apps

Update: I've determined that it's not NGINX's fault, but I need NGINX to fix it. Details at the bottom.

I'm trying to create review apps for every branch we create. We're using NGINX as our reverse proxy, Celery for a task queue, and Flower to monitor the tasks. Flower supplies a url_prefix argument https://flower.readthedocs.io/en/latest/config.html#url-prefix.

This prefix enables deployments of Flower on non-root URLs. In other words, it allows me to deploy flower behind a reverse proxy without having to use rewrites.

Ideally, our URL scheme would look like this:

/flower/{branch_name} -> Dashboard
/flower/{branch_name}/ -> Same dashboard
/flower/{branch_name}/api/task/apply/examples.ping -> Task call
/flower/{branch_name}/api/task/apply/examples.ping/ -> Same task call
/flower/latest/ -> Latest build Dashboard
/flower/staging/ -> Staging Dashboard
/flower/v1/ -> Production Dashboard

Our current config looks like this:

location ~ /flower/([a-zA-Z0-9]+)/? {
  proxy_pass          http://$1_flower:5555;
  proxy_set_header Host $host;
  proxy_redirect off;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
}

This currently works--sort of.

These currently work:

/flower/{branch_name}/
/flower/{branch_name}/api/task/apply/examples.ping

These do not:

/flower/{branch_name}
/flower/{branch_name}/api/task/apply/examples.ping/

~~I'm pretty sure the issue is how I've set up my NGINX proxy config.~~

Update: I've determined that it's not NGINX's fault, but I need NGINX to fix it.

Flower's url_prefix parameter doesn't understand that

/flower/{branch_name}/

and

/flower/{branch_name}

are the same endpoint.

I think I can solve this using a redirect from

/flower/{branch_name}

to

/flower/{branch_name}/

Does anybody know how the best practice for doing this without creating issues with the task call URLs?

over 4 years ago · Santiago Trujillo
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