- Portkey log retrieval started
- flower container added (dev and prod)
This commit is contained in:
33
scripts/start_flower.sh
Executable file → Normal file
33
scripts/start_flower.sh
Executable file → Normal file
@@ -1,9 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd "/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/" || exit 1
|
||||
source "/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/.venv/bin/activate"
|
||||
# scripts/start_flower.sh
|
||||
|
||||
# on development machine, no authentication required
|
||||
export FLOWER_UNAUTHENTICATED_API=True
|
||||
# Start a worker for the 'embeddings' queue with higher concurrency
|
||||
celery -A eveai_workers.celery flower
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user