documentdb-local-deployment

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Local Deployment & Developer Workflow — Azure DocumentDB

Azure DocumentDB 本地部署与开发者工作流

Image choices:
  • Gateway (
    ghcr.io/microsoft/documentdb/documentdb-local:latest
    ) — MongoDB wire protocol on port 10260. Use this for app development.
  • psql-only (
    mcr.microsoft.com/cosmosdb/ubuntu/documentdb-oss:...
    ) — raw PostgreSQL on port 9712. Use only for direct SQL inspection.
镜像选择:
  • Gateway
    ghcr.io/microsoft/documentdb/documentdb-local:latest
    )—— 在端口10260上支持MongoDB有线协议。适用于应用开发场景。
  • 仅psql版本
    mcr.microsoft.com/cosmosdb/ubuntu/documentdb-oss:...
    )—— 在端口9712上提供原生PostgreSQL服务。仅用于直接SQL检查场景。

Rules

规则

  • local-choose-deployment-method — Pick the simplest local option (Gateway, Compose, psql-only, or source) that matches the interface your app actually uses.
  • local-docker-compose-setup — Reproducible local stack via
    docker-compose.yml
    : pinned images,
    host.docker.internal
    ,
    restart: unless-stopped
    .
  • local-connection-config — Connect on port 10260 with
    --tls
    ,
    --tlsAllowInvalidCertificates
    , and SCRAM-SHA-256 for the self-signed local cert.
  • local-env-driven-config — Drive connection URI and TLS relaxation from env vars; never default
    tlsAllowInvalidCertificates=true
    in code.
  • local-sample-data-management — Use
    SKIP_INIT_DATA
    +
    INIT_DATA_PATH
    with vetted seed scripts; don't ship the built-in
    sampledb
    beyond local demos.
  • local-ports-and-bindings — Bind published ports to
    127.0.0.1
    and expose only what you use (10260 for Mongo, 9712 for psql).
  • local-prod-parity — Same connection abstraction and versioned index/seed scripts across local and Azure DocumentDB; integration-test against the real container.
  • local-choose-deployment-method — 选择与你的应用实际使用的接口匹配的最简本地部署方案(Gateway、Compose、仅psql版本或源码部署)。
  • local-docker-compose-setup — 通过
    docker-compose.yml
    实现可复现的本地栈:固定镜像版本、
    host.docker.internal
    restart: unless-stopped
  • local-connection-config — 通过端口10260连接,使用
    --tls
    --tlsAllowInvalidCertificates
    参数,针对自签名本地证书采用SCRAM-SHA-256认证。
  • local-env-driven-config — 通过环境变量驱动连接URI和TLS放宽设置;绝不在代码中默认
    tlsAllowInvalidCertificates=true
  • local-sample-data-management — 使用
    SKIP_INIT_DATA
    +
    INIT_DATA_PATH
    搭配经过验证的种子脚本;除本地演示外,不要交付内置的
    sampledb
  • local-ports-and-bindings — 将发布端口绑定到
    127.0.0.1
    ,仅暴露你实际使用的端口(Mongo用10260,psql用9712)。
  • local-prod-parity — 在本地环境与Azure DocumentDB之间保持相同的连接抽象和版本化索引/种子脚本;针对真实容器进行集成测试。