Skip to content

Commit 1cb3737

Browse files
authored
Merge pull request documentdb#1 from guanzhousongmicrosoft/documentdb-local-doc
Documentdb local doc improvement
2 parents 8d31647 + 68c52a0 commit 1cb3737

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

documentdb-local/index.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DocumentDB-local
2-
DocumentDB is available as a Docker container. It supports running on a wide variety of processors and operating systems and make it easy to try out and test DocumentDB.
2+
DocumentDB Local provides a lightweight, containerized environment for developing and testing applications locally, including prototyping and integration testing.
33

44

55
## Prerequisites
@@ -8,7 +8,7 @@ DocumentDB is available as a Docker container. It supports running on a wide var
88

99
## Installation
1010

11-
Get the Docker container image using `docker pull`. The container image is published to the Github container registry as `ghcr.io/documentdb/documentdb/documentdb-local:latest`.
11+
Get the Docker container image using `docker pull`.
1212

1313
```bash
1414
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
@@ -31,7 +31,7 @@ CONTAINER ID IMAGE
3131
5aff734a3591 ghcr.io/documentdb/documentdb/documentdb-local:latest "/bin/bash -c '/home…" 5 seconds ago Up 4 seconds 0.0.0.0:10260->10260/tcp, :::10260->10260/tcp optimistic_blackwell
3232
```
3333

34-
> The DocumenttDB Mongo protocol gateway endpoint is typically available on port `10260`. To access this with `mongosh` run:
34+
> The DocumentDB gateway endpoint is available on port `10260` by default. To access this with `mongosh`, run:
3535
3636
```bash
3737
mongosh "mongodb://demo:test@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true"
@@ -56,23 +56,29 @@ The following table summarizes the available Docker commands for configuring the
5656
| Requirement | Arg | Env | Allowed values | Default | Description |
5757
|---|---|---|---|---|---|
5858
| Print the settings to stdout from the container | `--help`, `-h` | N/A | N/A | N/A | Display information on available configuration |
59-
60-
To be continued...
61-
## Feature support
62-
63-
Please refer to the documentdb documentation for currently supported features,
59+
| Specify the username for DocumentDB. | `--username [value]` | Overrides `USERNAME` environment variable | STRING | `default_user` | Username for DocumentDB. |
60+
| Specify the password for DocumentDB. | `--password [value]` | Overrides `PASSWORD` environment variable | STRING | NA | Password for DocumentDB. This is required. |
61+
| The port of the DocumentDB endpoint. | `--documentdb-port [value]` | Overrides `PORT` environment variable | INT | `10260` | The port needs to published - for example, using `-p 10260:10260`. |
62+
| Specify a directory for data. | `--data-path [value]` | Overrides `DATA_PATH` environment variable. | STRING | `/data` | For example, to set `/usr/documentdb/data` as data directory, add this option to `docker run` command: `--mount type=bind,source=./.local/data,target=/usr/documentdb/data` |
63+
| Specify the owner. | `--owner [value]` | Overrides `OWNER` environment variable. | STRING | `documentdb` | Specify the owner for DocumentDB. |
64+
| Specify whether to start the PostgreSQL server. | `--start-pg` | NA | `true`, `false` | `true` | Specify whether to start the PostgreSQL server. |
65+
| Specify whether to create a user. | `--create-user` | NA | `true`, `false` | `true` | Specify whether to create a user. |
66+
| Specify the port for the PostgreSQL server. | `--pg-port [value]` | Overrides `PG_PORT` environment variable | INT | `9712` | Specify the port for the PostgreSQL server. |
67+
| Specify whether to allow external connections to PostgreSQL. | `--allow-external-connections` | Overrides `ALLOW_EXTERNAL_CONNECTIONS` environment variable | `true`, `false` | `false` | Specify whether to allow external connections to PostgreSQL. |
68+
| Specify the path to a certificate for securing traffic. | `--cert-path [value]` | Overrides `CERT_PATH` environment variable. | STRING | NA | You need to mount this file into the container. For example, to set `/mycert.pfx`, add this option to `docker run` command: `--mount type=bind,source=./mycert.pfx,target=/mycert.pfx`. Can set `CERT_SECRET` to the password for the certificate. |
69+
| Override default key with key in key file. | `--key-file [value]` | Overrides `KEY_FILE` environment variable. | STRING | NA | You need to mount this file into the container. For example, to set `/mykey.key`, add this option to `docker run` command: `--mount type=bind,source=./mykey.key,target=/mykey.key` |
70+
| Enable telemetry data. | `--enable-telemetry` | Overrides `ENABLE_TELEMETRY` environment variable | `true`, `false` | `false` | Enable telemetry data sent to the usage collector (Azure Application Insights). |
71+
| Specify log verbosity. | `--log-level [value]` | Overrides `LOG_LEVEL` environment variable. | `quiet`, `error`, `warn`, `info`, `debug`, `trace` | `info` | The verbosity of logs that will be emitted. |
6472

6573

66-
## Limitations
67-
68-
In addition to features not yet supported or not planned, the following list includes current limitations of docuemntdb-lcoal:
74+
## Feature support
6975

70-
To be added.
76+
Please refer to the [documentdb](https://documentdb.io/docs/) documentation for currently supported features.
7177

7278

7379
## Installing certificates
7480

75-
DocumentDB-local by default will generate new selef signed certificates each tome you start the container. To avoid certificate errors these can be installed on the local host. The example belw will show how to use this with `mongosh`.
81+
By default, DocumentDB Local generates new self-signed certificates each time the container starts. To prevent certificate errors, install them on your local machine. The example below shows how to use this setup with `mongosh`.
7682

7783
### Get certificate
7884

@@ -101,8 +107,6 @@ For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
101107
[direct: mongos] test>
102108
```
103109

104-
## Use in continuous integration workflow
105-
TBD
106110

107111
## Reporting issues
108112

getting-started/mongo-shell-quickstart.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ Before connecting from Node.js, make sure you have a running DocumentDB instance
2323

2424
# Run the container with your chosen username and password
2525
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
26-
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
27-
```
28-
> **Note:** During the transition to the Linux Foundation, Docker images may still be hosted on Microsoft's container registry. These will be migrated to the new DocumentDB organization as the transition completes.
29-
>
26+
27+
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest
28+
```
3029
> **Note:** Replace `<YOUR_USERNAME>` and `<YOUR_PASSWORD>` with your desired credentials. You must set these when creating the container for authentication to work.
3130
>
3231
> **Port Note:** Port `10260` is used by default in these instructions to avoid conflicts with other local database services. You can use port `27017` (the standard MongoDB port) or any other available port if you prefer. If you do, be sure to update the port number in both your `docker run` command and your connection string accordingly.

0 commit comments

Comments
 (0)