From 28c7aec15c6c4dc3cb918e46f68fcac886bfa1c0 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Thu, 21 Dec 2023 06:43:07 +0700 Subject: [PATCH 1/3] Update docs of mongo-express --- mongo-express/content.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/mongo-express/content.md b/mongo-express/content.md index 13b6df497b75..d183c9bef003 100644 --- a/mongo-express/content.md +++ b/mongo-express/content.md @@ -9,7 +9,7 @@ mongo-express is a web-based MongoDB admin interface written in Node.js, Express # How to use this image ```console -$ docker run --network some-network -e ME_CONFIG_MONGODB_SERVER=some-mongo -p 8081:8081 %%IMAGE%% +$ docker run --link some_mongo_container:mongo -p 8081:8081 -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" mongo-express ``` Then you can hit `http://localhost:8081` or `http://host-ip:8081` in your browser. @@ -26,13 +26,10 @@ Environment vairables are passed to the `run` command for configuring a mongo-ex Name | Default | Description --------------------------------|-----------------|------------ + ME_CONFIG_MONGODB_URL | 'mongodb://mongo:27017' | MongoDB connection string ME_CONFIG_BASICAUTH_USERNAME | '' | mongo-express web username ME_CONFIG_BASICAUTH_PASSWORD | '' | mongo-express web password ME_CONFIG_MONGODB_ENABLE_ADMIN | 'true' | Enable admin access to all databases. Send strings: `"true"` or `"false"` - ME_CONFIG_MONGODB_ADMINUSERNAME | '' | MongoDB admin username - ME_CONFIG_MONGODB_ADMINPASSWORD | '' | MongoDB admin password - ME_CONFIG_MONGODB_PORT | 27017 | MongoDB port - ME_CONFIG_MONGODB_SERVER | 'mongo' | MongoDB container name. Use comma delimited list of host names for replica sets. ME_CONFIG_OPTIONS_EDITORTHEME | 'default' | mongo-express editor color theme, [more here](http://codemirror.net/demo/theme.html) ME_CONFIG_REQUEST_SIZE | '100kb' | Maximum payload size. CRUD operations above this size will fail in [body-parser](https://www.npmjs.com/package/body-parser). ME_CONFIG_SITE_BASEURL | '/' | Set the baseUrl to ease mounting at a subdirectory. Remember to include a leading and trailing slash. @@ -54,14 +51,14 @@ The following are only needed if `ME_CONFIG_MONGODB_ENABLE_ADMIN` is **"false"** ```console $ docker run -it --rm \ - --network web_default \ - --name mongo-express \ - -p 8081:8081 \ - -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \ - -e ME_CONFIG_MONGODB_SERVER="web_db_1" \ - -e ME_CONFIG_BASICAUTH_USERNAME="user" \ - -e ME_CONFIG_BASICAUTH_PASSWORD="fairly long password" \ - %%IMAGE%% + --name mongo-express \ + --link web_db_1:mongo \ + -p 8081:8081 \ + -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \ + -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \ + -e ME_CONFIG_BASICAUTH_USERNAME="user" \ + -e ME_CONFIG_BASICAUTH_PASSWORD="fairly long password" \ + mongo-express ``` This example links to a container name typical of `docker-compose`, changes the editor's color theme, and enables basic authentication. From 5e0a8ac9a927f9c6cc6f3bac8027700559a6e604 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Thu, 21 Dec 2023 07:13:58 +0700 Subject: [PATCH 2/3] Remove link in the command, change to image template and change tab to space. --- mongo-express/content.md | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/mongo-express/content.md b/mongo-express/content.md index d183c9bef003..7486aa8b6f07 100644 --- a/mongo-express/content.md +++ b/mongo-express/content.md @@ -9,7 +9,7 @@ mongo-express is a web-based MongoDB admin interface written in Node.js, Express # How to use this image ```console -$ docker run --link some_mongo_container:mongo -p 8081:8081 -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" mongo-express +$ docker run -p 8081:8081 -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" %%IMAGE%% ``` Then you can hit `http://localhost:8081` or `http://host-ip:8081` in your browser. @@ -24,41 +24,41 @@ JSON documents are parsed through a javascript virtual machine, so the web inter Environment vairables are passed to the `run` command for configuring a mongo-express container. - Name | Default | Description - --------------------------------|-----------------|------------ - ME_CONFIG_MONGODB_URL | 'mongodb://mongo:27017' | MongoDB connection string - ME_CONFIG_BASICAUTH_USERNAME | '' | mongo-express web username - ME_CONFIG_BASICAUTH_PASSWORD | '' | mongo-express web password - ME_CONFIG_MONGODB_ENABLE_ADMIN | 'true' | Enable admin access to all databases. Send strings: `"true"` or `"false"` - ME_CONFIG_OPTIONS_EDITORTHEME | 'default' | mongo-express editor color theme, [more here](http://codemirror.net/demo/theme.html) - ME_CONFIG_REQUEST_SIZE | '100kb' | Maximum payload size. CRUD operations above this size will fail in [body-parser](https://www.npmjs.com/package/body-parser). - ME_CONFIG_SITE_BASEURL | '/' | Set the baseUrl to ease mounting at a subdirectory. Remember to include a leading and trailing slash. - ME_CONFIG_SITE_COOKIESECRET | 'cookiesecret' | String used by [cookie-parser middleware](https://www.npmjs.com/package/cookie-parser) to sign cookies. - ME_CONFIG_SITE_SESSIONSECRET | 'sessionsecret' | String used to sign the session ID cookie by [express-session middleware](https://www.npmjs.com/package/express-session). - ME_CONFIG_SITE_SSL_ENABLED | 'false' | Enable SSL. - ME_CONFIG_SITE_SSL_CRT_PATH | '' | SSL certificate file. - ME_CONFIG_SITE_SSL_KEY_PATH | '' | SSL key file. + Name | Default | Description + --------------------------------|-----------------|------------ + ME_CONFIG_MONGODB_URL | 'mongodb://mongo:27017' | MongoDB connection string + ME_CONFIG_BASICAUTH_USERNAME | '' | mongo-express web username + ME_CONFIG_BASICAUTH_PASSWORD | '' | mongo-express web password + ME_CONFIG_MONGODB_ENABLE_ADMIN | 'true' | Enable admin access to all databases. Send strings: `"true"` or `"false"` + ME_CONFIG_OPTIONS_EDITORTHEME | 'default' | mongo-express editor color theme, [more here](http://codemirror.net/demo/theme.html) + ME_CONFIG_REQUEST_SIZE | '100kb' | Maximum payload size. CRUD operations above this size will fail in [body-parser](https://www.npmjs.com/package/body-parser). + ME_CONFIG_SITE_BASEURL | '/' | Set the baseUrl to ease mounting at a subdirectory. Remember to include a leading and trailing slash. + ME_CONFIG_SITE_COOKIESECRET | 'cookiesecret' | String used by [cookie-parser middleware](https://www.npmjs.com/package/cookie-parser) to sign cookies. + ME_CONFIG_SITE_SESSIONSECRET | 'sessionsecret' | String used to sign the session ID cookie by [express-session middleware](https://www.npmjs.com/package/express-session). + ME_CONFIG_SITE_SSL_ENABLED | 'false' | Enable SSL. + ME_CONFIG_SITE_SSL_CRT_PATH | '' | SSL certificate file. + ME_CONFIG_SITE_SSL_KEY_PATH | '' | SSL key file. The following are only needed if `ME_CONFIG_MONGODB_ENABLE_ADMIN` is **"false"** - Name | Default | Description - --------------------------------|-----------------|------------ - ME_CONFIG_MONGODB_AUTH_DATABASE | 'db' | Database name - ME_CONFIG_MONGODB_AUTH_USERNAME | 'admin' | Database username - ME_CONFIG_MONGODB_AUTH_PASSWORD | 'pass' | Database password + Name | Default | Description + --------------------------------|-----------------|------------ + ME_CONFIG_MONGODB_AUTH_DATABASE | 'db' | Database name + ME_CONFIG_MONGODB_AUTH_USERNAME | 'admin' | Database username + ME_CONFIG_MONGODB_AUTH_PASSWORD | 'pass' | Database password ## Example ```console $ docker run -it --rm \ - --name mongo-express \ - --link web_db_1:mongo \ - -p 8081:8081 \ - -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \ - -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \ - -e ME_CONFIG_BASICAUTH_USERNAME="user" \ - -e ME_CONFIG_BASICAUTH_PASSWORD="fairly long password" \ - mongo-express + --name mongo-express \ + --link web_db_1:mongo \ + -p 8081:8081 \ + -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \ + -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \ + -e ME_CONFIG_BASICAUTH_USERNAME="user" \ + -e ME_CONFIG_BASICAUTH_PASSWORD="fairly long password" \ + %%IMAGE%% ``` This example links to a container name typical of `docker-compose`, changes the editor's color theme, and enables basic authentication. From a1e945b4acf1c93d7189b603d513704ef3905318 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Thu, 21 Dec 2023 07:36:56 +0700 Subject: [PATCH 3/3] Fix format and remove link Signed-off-by: Bervianto Leo Pratama --- mongo-express/content.md | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/mongo-express/content.md b/mongo-express/content.md index 7486aa8b6f07..83306f0cfe4b 100644 --- a/mongo-express/content.md +++ b/mongo-express/content.md @@ -24,35 +24,34 @@ JSON documents are parsed through a javascript virtual machine, so the web inter Environment vairables are passed to the `run` command for configuring a mongo-express container. - Name | Default | Description - --------------------------------|-----------------|------------ - ME_CONFIG_MONGODB_URL | 'mongodb://mongo:27017' | MongoDB connection string - ME_CONFIG_BASICAUTH_USERNAME | '' | mongo-express web username - ME_CONFIG_BASICAUTH_PASSWORD | '' | mongo-express web password - ME_CONFIG_MONGODB_ENABLE_ADMIN | 'true' | Enable admin access to all databases. Send strings: `"true"` or `"false"` - ME_CONFIG_OPTIONS_EDITORTHEME | 'default' | mongo-express editor color theme, [more here](http://codemirror.net/demo/theme.html) - ME_CONFIG_REQUEST_SIZE | '100kb' | Maximum payload size. CRUD operations above this size will fail in [body-parser](https://www.npmjs.com/package/body-parser). - ME_CONFIG_SITE_BASEURL | '/' | Set the baseUrl to ease mounting at a subdirectory. Remember to include a leading and trailing slash. - ME_CONFIG_SITE_COOKIESECRET | 'cookiesecret' | String used by [cookie-parser middleware](https://www.npmjs.com/package/cookie-parser) to sign cookies. - ME_CONFIG_SITE_SESSIONSECRET | 'sessionsecret' | String used to sign the session ID cookie by [express-session middleware](https://www.npmjs.com/package/express-session). - ME_CONFIG_SITE_SSL_ENABLED | 'false' | Enable SSL. - ME_CONFIG_SITE_SSL_CRT_PATH | '' | SSL certificate file. - ME_CONFIG_SITE_SSL_KEY_PATH | '' | SSL key file. + Name | Default | Description + --------------------------------|-----------------|------------ + ME_CONFIG_MONGODB_URL | 'mongodb://mongo:27017' | MongoDB connection string + ME_CONFIG_BASICAUTH_USERNAME | '' | mongo-express web username + ME_CONFIG_BASICAUTH_PASSWORD | '' | mongo-express web password + ME_CONFIG_MONGODB_ENABLE_ADMIN | 'true' | Enable admin access to all databases. Send strings: `"true"` or `"false"` + ME_CONFIG_OPTIONS_EDITORTHEME | 'default' | mongo-express editor color theme, [more here](http://codemirror.net/demo/theme.html) + ME_CONFIG_REQUEST_SIZE | '100kb' | Maximum payload size. CRUD operations above this size will fail in [body-parser](https://www.npmjs.com/package/body-parser). + ME_CONFIG_SITE_BASEURL | '/' | Set the baseUrl to ease mounting at a subdirectory. Remember to include a leading and trailing slash. + ME_CONFIG_SITE_COOKIESECRET | 'cookiesecret' | String used by [cookie-parser middleware](https://www.npmjs.com/package/cookie-parser) to sign cookies. + ME_CONFIG_SITE_SESSIONSECRET | 'sessionsecret' | String used to sign the session ID cookie by [express-session middleware](https://www.npmjs.com/package/express-session). + ME_CONFIG_SITE_SSL_ENABLED | 'false' | Enable SSL. + ME_CONFIG_SITE_SSL_CRT_PATH | '' | SSL certificate file. + ME_CONFIG_SITE_SSL_KEY_PATH | '' | SSL key file. The following are only needed if `ME_CONFIG_MONGODB_ENABLE_ADMIN` is **"false"** - Name | Default | Description - --------------------------------|-----------------|------------ - ME_CONFIG_MONGODB_AUTH_DATABASE | 'db' | Database name - ME_CONFIG_MONGODB_AUTH_USERNAME | 'admin' | Database username - ME_CONFIG_MONGODB_AUTH_PASSWORD | 'pass' | Database password + Name | Default | Description + --------------------------------|-----------------|------------ + ME_CONFIG_MONGODB_AUTH_DATABASE | 'db' | Database name + ME_CONFIG_MONGODB_AUTH_USERNAME | 'admin' | Database username + ME_CONFIG_MONGODB_AUTH_PASSWORD | 'pass' | Database password ## Example ```console $ docker run -it --rm \ --name mongo-express \ - --link web_db_1:mongo \ -p 8081:8081 \ -e ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \ -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \