Files
eveAI/scripts/start_flower.sh
Josako 883175b8f5 - Portkey log retrieval started
- flower container added (dev and prod)
2024-10-01 08:01:59 +02:00

29 lines
781 B
Bash

#!/bin/bash
set -e
# scripts/start_flower.sh
# Set default values
REDIS_HOST=${REDIS_URL:-redis}
REDIS_PORT=${REDIS_PORT:-6379}
# Set environment-specific variables
if [ "$FLASK_ENV" = "production" ]; then
# Production settings
export FLOWER_BASIC_AUTH="${FLOWER_USER}:${FLOWER_PASSWORD}"
export FLOWER_BROKER_URL="redis://${REDIS_USER}:${REDIS_PASS}@${REDIS_URL}:${REDIS_PORT}/0"
export CELERY_BROKER_URL="redis://${REDIS_USER}:${REDIS_PASS}@${REDIS_URL}:${REDIS_PORT}/0"
else
# Development settings
export FLOWER_BROKER_URL="redis://${REDIS_HOST}:${REDIS_PORT}/0"
export CELERY_BROKER_URL="redis://${REDIS_HOST}:${REDIS_PORT}/0"
fi
echo $BROKER_URL
echo "----------"
# Start Flower
exec celery flower \
--url-prefix=/flower \
--port=5555