services:
  sub-store:
    image: xream/sub-store:http-meta
    container_name: sub-store
    restart: unless-stopped
    ports:
      - "127.0.0.1:9002:3001"
      - "127.0.0.1:9003:9876"
    environment:
      # 后端配置
      SUB_STORE_BACKEND_API_HOST: 0.0.0.0
      SUB_STORE_BACKEND_API_PORT: 3001
      SUB_STORE_BACKEND_MERGE: true
      SUB_STORE_FRONTEND_BACKEND_PATH: /lmqCQMYSZGAYRty

      # MMDB数据库路径
      SUB_STORE_MMDB_COUNTRY_PATH: /opt/app/data/GeoLite2-Country.mmdb
      SUB_STORE_MMDB_ASN_PATH: /opt/app/data/GeoLite2-ASN.mmdb

      # MMDB自动更新
      SUB_STORE_MMDB_COUNTRY_URL: https://gh-proxy.org/https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-Country.mmdb
      SUB_STORE_MMDB_ASN_URL: https://gh-proxy.org/https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-ASN.mmdb
      SUB_STORE_MMDB_CRON: 0 0 */3 * *

      # http-meta配置
      PORT: 9876
      HOST: 0.0.0.0
    volumes:
      - ./data:/opt/app/data
