docker-compose.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. services:
  2. app:
  3. build: .
  4. ports:
  5. - "5000:5000"
  6. environment:
  7. - FLASK_ENV=production
  8. - FLASK_DEBUG=false
  9. - FLASK_HOST=0.0.0.0
  10. - FLASK_PORT=5000
  11. - FLASK_APP=src.app
  12. - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/agent
  13. - SECRET_KEY=${SECRET_KEY:-dev-secret-key-change-in-production}
  14. - SERPAPI_KEY=${SERPAPI_KEY}
  15. - SERPAPI_API_KEY=${SERPAPI_KEY}
  16. - WIKI_USERNAME=${WIKI_USERNAME}
  17. - WIKI_PASSWORD=${WIKI_PASSWORD}
  18. - SCW_API_KEY=${SCW_API_KEY}
  19. - SCW_ENDPOINT=${SCW_ENDPOINT:-d7d5949a-c2bb-484a-b973-e05a83510efd}
  20. - SCW_MODEL=${SCW_MODEL:-mistral-small-3.2-24b-instruct-2506}
  21. - OLLAMA_HOST=http://ollama:11434
  22. - UPLOAD_FOLDER=uploads
  23. - MAX_CONTENT_LENGTH=16777216
  24. volumes:
  25. - ./uploads:/app/uploads
  26. - ./data:/app/data
  27. - ./src/data:/app/src/data
  28. depends_on:
  29. postgres:
  30. condition: service_healthy
  31. restart: unless-stopped
  32. healthcheck:
  33. test: ["CMD", "curl", "-f", "http://localhost:5000/"]
  34. interval: 30s
  35. timeout: 10s
  36. retries: 3
  37. postgres:
  38. image: postgres:15-alpine
  39. ports:
  40. - "5432:5432" # Expose pour mode local (app sur Windows)
  41. environment:
  42. - POSTGRES_USER=postgres
  43. - POSTGRES_PASSWORD=postgres
  44. - POSTGRES_DB=agent
  45. volumes:
  46. - postgres_data:/var/lib/postgresql/data
  47. healthcheck:
  48. test: ["CMD-SHELL", "pg_isready -U postgres"]
  49. interval: 5s
  50. timeout: 5s
  51. retries: 5
  52. ollama:
  53. image: ollama/ollama:latest
  54. ports:
  55. - "11434:11434"
  56. volumes:
  57. - ollama_data:/root/.ollama
  58. restart: unless-stopped
  59. healthcheck:
  60. test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
  61. interval: 30s
  62. timeout: 10s
  63. retries: 3
  64. volumes:
  65. ollama_data:
  66. postgres_data: