OK
This commit is contained in:
131
docker-compose.yml
Normal file
131
docker-compose.yml
Normal file
@@ -0,0 +1,131 @@
|
||||
services:
|
||||
# Redis for Celery broker and caching
|
||||
redis:
|
||||
image: panjit-ai-meeting-assistant:redis
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Main application (Backend + Frontend)
|
||||
ai-meeting-app:
|
||||
image: panjit-ai-meeting-assistant:main
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
# No external port; only Nginx exposes ports
|
||||
environment:
|
||||
- DATABASE_URL=mysql+pymysql://A060:WLeSCi0yhtc7@mysql.theaken.com:33306/db_A060
|
||||
- JWT_SECRET_KEY=your-super-secret-key-that-no-one-should-know
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
- DIFY_API_BASE_URL=https://dify.theaken.com/v1
|
||||
- DIFY_STT_API_KEY=app-xQeSipaQecs0cuKeLvYDaRsu
|
||||
- DIFY_TRANSLATOR_API_KEY=app-YOPrF2ro5fshzMkCZviIuUJd
|
||||
- DIFY_SUMMARIZER_API_KEY=app-oFptWFRlSgvwhJ8DzZKN08a0
|
||||
- DIFY_ACTION_EXTRACTOR_API_KEY=app-UHU5IrVcwE0nVvgzubpGRqym
|
||||
- FLASK_RUN_PORT=12015
|
||||
# LDAP Configuration
|
||||
- LDAP_SERVER=panjit.com.tw
|
||||
- LDAP_PORT=389
|
||||
- LDAP_USE_SSL=False
|
||||
- LDAP_BIND_USER_DN=CN=LdapBind,CN=Users,DC=PANJIT,DC=COM,DC=TW
|
||||
- LDAP_BIND_USER_PASSWORD=panjit2481
|
||||
- LDAP_SEARCH_BASE=OU=PANJIT,DC=panjit,DC=com,DC=tw
|
||||
- LDAP_USER_LOGIN_ATTR=userPrincipalName
|
||||
volumes:
|
||||
- ./uploads:/app/uploads
|
||||
depends_on:
|
||||
- redis
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 2G
|
||||
cpus: '1.5'
|
||||
reservations:
|
||||
memory: 1G
|
||||
cpus: '0.8'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:12015/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
networks:
|
||||
- ai-meeting-network
|
||||
|
||||
# Celery worker for AI processing
|
||||
celery-worker:
|
||||
image: panjit-ai-meeting-assistant:main
|
||||
pull_policy: never
|
||||
restart: unless-stopped
|
||||
command: celery -A celery_worker.celery worker --loglevel=info --concurrency=4 -Q default,ai_tasks,celery --pool=eventlet
|
||||
environment:
|
||||
- DATABASE_URL=mysql+pymysql://A060:WLeSCi0yhtc7@mysql.theaken.com:33306/db_A060
|
||||
- JWT_SECRET_KEY=your-super-secret-key-that-no-one-should-know
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
- DIFY_API_BASE_URL=https://dify.theaken.com/v1
|
||||
- DIFY_STT_API_KEY=app-xQeSipaQecs0cuKeLvYDaRsu
|
||||
- DIFY_TRANSLATOR_API_KEY=app-YOPrF2ro5fshzMkCZviIuUJd
|
||||
- DIFY_SUMMARIZER_API_KEY=app-oFptWFRlSgvwhJ8DzZKN08a0
|
||||
- DIFY_ACTION_EXTRACTOR_API_KEY=app-UHU5IrVcwE0nVvgzubpGRqym
|
||||
volumes:
|
||||
- ./uploads:/app/uploads
|
||||
depends_on:
|
||||
- redis
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 2G
|
||||
reservations:
|
||||
memory: 1G
|
||||
networks:
|
||||
- ai-meeting-network
|
||||
|
||||
# Celery Flower for monitoring
|
||||
celery-flower:
|
||||
image: panjit-ai-meeting-assistant:main
|
||||
pull_policy: never
|
||||
restart: unless-stopped
|
||||
command: celery -A celery_worker.celery flower --broker=redis://redis:6379/0 --port=5555
|
||||
ports:
|
||||
- "5555:5555"
|
||||
environment:
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
- ai-meeting-network
|
||||
|
||||
# Nginx reverse proxy
|
||||
nginx:
|
||||
image: panjit-ai-meeting-assistant:nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
dockerfile: Dockerfile
|
||||
container_name: ai-meeting-nginx
|
||||
depends_on:
|
||||
- ai-meeting-app
|
||||
ports:
|
||||
- "12015:12015"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ai-meeting-network
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
ai-meeting-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user