# ============================================================ # Data Nexus - Docker Compose 配置 # 应用服务(数据库使用远程云服务) # ============================================================ services: app: build: context: . dockerfile: Dockerfile container_name: data-nexus-app restart: unless-stopped ports: - "8000:8000" env_file: - .env volumes: # 持久化本地存储目录 - storage_data:/data/storage healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"] interval: 30s timeout: 10s retries: 3 # -------------------- 持久化卷 -------------------- volumes: storage_data: driver: local