services: web: build: . image: menchuang:latest container_name: menchuang restart: unless-stopped ports: - "8000:8000" environment: # SQLite 落在数据卷; 如需 MySQL: mysql+aiomysql://user:pwd@host:3306/hmc HMC_DATABASE_URL: sqlite+aiosqlite:////app/db/huamenchuang.db # 生产务必换成随机长密钥(登录态签名) HMC_JWT_SECRET: ${HMC_JWT_SECRET:-change-me-in-production-please-set-a-long-random-secret-key} TZ: Asia/Shanghai volumes: - db_data:/app/db healthcheck: test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8000/api/health',timeout=4)"] interval: 30s timeout: 5s retries: 3 start_period: 30s volumes: db_data: