services:
  certd:
    image: ${CERTD_IMAGE:-registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest}
    container_name: certd
    restart: unless-stopped
    environment:
      - TZ=Asia/Shanghai
      - certd_system_resetAdminPasswd=${RESET_ADMIN_PASSWD:-false}
      - certd_koa_hostname=0.0.0.0
    volumes:
      # ⚠ 冒号后面的 /app/data 切记不要修改，只改冒号前面的宿主机路径
      - ${CERTD_DATA_DIR:-/data/certd}:/app/data
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "127.0.0.1:7001:7001"
    dns:
      - 223.5.5.5
      - 8.8.8.8
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:7001"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 15s
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"
