version: '3.8' services: suanming-app: build: context: . dockerfile: Dockerfile ports: - "8000:8000" environment: - NODE_ENV=production - PORT=8000 - JWT_SECRET=${JWT_SECRET:-your-super-secret-jwt-key-change-this-in-production} volumes: # 持久化数据库文件 - suanming-data:/app/data restart: unless-stopped healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s volumes: suanming-data: driver: local networks: default: name: suanming-network