Spaces:
Sleeping
Sleeping
File size: 2,384 Bytes
526927a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
version: '3.8'
services:
# Lily LLM API Server
lily-llm-api:
build: .
container_name: lily-llm-api
ports:
- "8001:8001"
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=sqlite:///app/data/lily_llm.db
- LOG_LEVEL=INFO
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./models:/app/models
- ./uploads:/app/uploads
depends_on:
- redis
restart: unless-stopped
networks:
- lily-network
# Redis for Celery and caching
redis:
image: redis:7-alpine
container_name: lily-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
networks:
- lily-network
# Celery Worker
celery-worker:
build: .
container_name: lily-celery-worker
command: celery -A lily_llm_core.celery_app worker --loglevel=info
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=sqlite:///app/data/lily_llm.db
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./models:/app/models
- ./uploads:/app/uploads
depends_on:
- redis
restart: unless-stopped
networks:
- lily-network
# Celery Beat (Scheduler)
celery-beat:
build: .
container_name: lily-celery-beat
command: celery -A lily_llm_core.celery_app beat --loglevel=info
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=sqlite:///app/data/lily_llm.db
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./data:/app/data
- ./logs:/app/logs
depends_on:
- redis
restart: unless-stopped
networks:
- lily-network
# Flower (Celery Monitoring)
flower:
build: .
container_name: lily-flower
command: celery -A lily_llm_core.celery_app flower --port=5555
ports:
- "5555:5555"
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
- redis
restart: unless-stopped
networks:
- lily-network
volumes:
redis_data:
networks:
lily-network:
driver: bridge
|