docker-compose.yml 789 B

1234567891011121314151617181920212223242526272829
  1. # ============================================================
  2. # Data Nexus - Docker Compose 配置
  3. # 应用服务(数据库使用远程云服务)
  4. # ============================================================
  5. services:
  6. app:
  7. build:
  8. context: .
  9. dockerfile: Dockerfile
  10. container_name: data-nexus-app
  11. restart: unless-stopped
  12. ports:
  13. - "8000:8000"
  14. env_file:
  15. - .env
  16. volumes:
  17. # 持久化本地存储目录
  18. - storage_data:/data/storage
  19. healthcheck:
  20. test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
  21. interval: 30s
  22. timeout: 10s
  23. retries: 3
  24. # -------------------- 持久化卷 --------------------
  25. volumes:
  26. storage_data:
  27. driver: local