services: asterisk: image: pline-ai/asterisk:latest build: context: ./asterisk container_name: pline-ai-asterisk network_mode: host env_file: - .env environment: STT_URL: http://127.0.0.1:5001/transcribe TTS_URL: http://127.0.0.1:5002/synthesize volumes: - ./asterisk/config:/etc/asterisk - ./asterisk/templates:/etc/asterisk-templates - ./agi-scripts:/var/lib/asterisk/agi-bin - ./asterisk/sounds:/var/lib/asterisk/sounds/custom - voice_storage:/tmp/voicebot # استفاده از volume مشترک restart: unless-stopped depends_on: - stt-service - tts-service stt-service: image: pline-ai/stt:latest build: context: ./stt container_name: pline-ai-stt network_mode: host env_file: - .env environment: PORT: 5001 WHISPER_MODEL: /models/whisper WHISPER_DEVICE: cuda WHISPER_COMPUTE_TYPE: float16 volumes: - ./models/whisper:/models/whisper deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu restart: unless-stopped tts-service: image: pline-ai/tts:latest build: context: ./tts container_name: pline-ai-tts network_mode: host env_file: - .env environment: PORT: 5002 volumes: - ./models/piper:/models/piper - voice_storage:/tmp/voicebot # اضافه شده برای دسترسی به مسیر مشترک restart: unless-stopped volumes: voice_storage: # تعریف حجم مشترک