nginx: route /flower to the queue monitoring system.

This patch removes the exposed port for the flower
server and instead uses nginx to route urls /flower/*
to the queue monitoring system.
This commit is contained in:
Trammell Hudson 2022-12-06 12:58:05 +00:00
parent 5922e29369
commit 43b194d612
2 changed files with 7 additions and 3 deletions

View file

@ -86,10 +86,8 @@ services:
restart: on-failure
flower:
build: .
command: celery -A celerywyrm flower --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD}
command: celery -A celerywyrm flower --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD} --url_prefix=flower
env_file: .env
ports:
- ${FLOWER_PORT}:${FLOWER_PORT}
volumes:
- .:/app
networks:

View file

@ -70,4 +70,10 @@ server {
add_header X-Cache-Status STATIC;
access_log off;
}
# monitor the celery queues with flower, no caching enabled
location /flower/ {
proxy_pass http://flower:8888;
proxy_cache_bypass 1;
}
}