Skip to content

Commit 6e3c9c0

Browse files
DOCSP-25364 Config File (#435)
* DOCSP-25364 Configuration file * DOCSP-25364 Configuration file * DOCSP-25364 added ref page * DOCSP-25364 fixed toc * DOCSP-25364 fixed toc * DOCSP-25364 fixed toc * DOCSP-25364 typo fixes * DOCSP-25364 added ref to networkTraffic * DOCSP-25364 added ref to networkTraffic * DOCSP-25364 internal feedback * DOCSP-25364 toc fix * DOCSP-25364 nit change * DOCSP-25364 nit change * DOCSP-25364 internal feedback * DOCSP-25364 tech feedback * DOCSP-25364 nit change: * DOCSP-25363 trying to pull in updates * DOCSP-25364 check staging * DOCSP-25364 updated connect toc tee
1 parent cd4e250 commit 6e3c9c0

File tree

5 files changed

+181
-1
lines changed

5 files changed

+181
-1
lines changed

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ intersphinx = [
99

1010
toc_landing_pages = [
1111
"/install",
12-
"/connect",
12+
"/connect",
1313
"/connect/favorite-connections",
1414
"/connect/favorite-connections/import-export-cli/",
1515
"/instance",
16+
"/config-file",
1617
"/query/filter",
1718
"/query/queries",
1819
"/documents",

source/config-file.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _config-file:
2+
3+
==========================
4+
Compass Configuration File
5+
==========================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
You can configure |compass| settings using a configuration file. Configure
16+
settings with a configuration file to maintain consistent behavior between
17+
|compass-short| sessions.
18+
19+
Use Cases
20+
---------
21+
22+
Use the configuration file to specify |compass-short| settings and behaviors.
23+
For example:
24+
25+
- If your deployment has strict privacy requirements, you can configure
26+
|compass-short| to block outgoing network connections.
27+
28+
- If you need to restrict what actions users can perform in |compass-short|, you
29+
can disable the embedded shell and make |compass-short| read-only.
30+
31+
- If you have multiple team members using |compass-short|, you can use a common
32+
configuration file to ensure a consistent user experience.
33+
34+
Configuration File Location
35+
---------------------------
36+
37+
- For macOS and Linux, the configuration file is located at ``/etc/mongodb-compass.conf``.
38+
39+
- For Windows, the configuration file is located at ``<path\to\compass>\..\mongodb-compass.cfg``.
40+
41+
Behavior
42+
--------
43+
44+
When you configure settings with a configuration file:
45+
46+
- You can not modify settings set in the configuration file after startup.
47+
48+
- You can specify the configuration file in either EJSON or YAML format.
49+
50+
- To view all available |compass-short| configuration options, run the following
51+
command in the folder containing your |compass| executable:
52+
53+
.. code-block:: sh
54+
55+
<path-to-Compass-executable> --help
56+
57+
Tasks
58+
-----
59+
60+
To see how to configure specific settings, see :ref:`Compass Configuration File Options
61+
<config-file-options>`.
62+
63+
.. toctree::
64+
:titlesonly:
65+
66+
/config-settings/config-file-options
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. _config-file-options:
2+
3+
-----------------------------------
4+
Compass Configuration File Settings
5+
-----------------------------------
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
You can configure |compass| using a configuration file. The configuration file
16+
configures settings at startup. Settings configured using the configuration file
17+
cannot be modified on the |compass-short| interface. For more detailed guidance
18+
on how to configure a setting, see the task page for the specific setting.
19+
20+
Syntax
21+
------
22+
23+
You can configure |compass-short| configuration file settings in either EJSON or
24+
YAML format.
25+
26+
EJSON
27+
`````
28+
29+
.. code-block:: json
30+
31+
{
32+
"setting": value,
33+
"setting": value,
34+
...
35+
}
36+
37+
YAML
38+
````
39+
40+
.. code-block:: yaml
41+
42+
setting option: value
43+
setting option: value
44+
...
45+
46+
Settings
47+
--------
48+
49+
You can configure the following settings in a configuration file:
50+
51+
.. list-table::
52+
:header-rows: 1
53+
:widths: 15 60
54+
55+
* - Setting
56+
- Definition
57+
58+
* - :ref:`networkTraffic <compass-configure-network-traffic>`
59+
- Configure |compass| to not perform outgoing network operations other
60+
than those to the database.
61+
62+
Learn More
63+
----------
64+
65+
For more information, see :ref:`Compass Configuration File <config-file>`.

source/connect/cli-options.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. _cli-options:
2+
3+
----------------------------
4+
Compass Command Line Options
5+
----------------------------
6+
7+
The following page provides an overview on how to set command line options for
8+
|compass|. For more detailed guidance on how to set a specific command line
9+
option, see the task page for the specific option.
10+
11+
Definition
12+
----------
13+
14+
You can start |compass| and set configuration options from the command line.
15+
When you use the command line to set configuration options, the options are
16+
set at startup. Settings configured using command line options cannot be
17+
modified on the |compass-short| interface.
18+
19+
Syntax
20+
------
21+
22+
Use the following syntax to start |compass| and set a configuration option:
23+
24+
.. code-block:: sh
25+
26+
<path-to-Compass-executable> --<option>
27+
28+
Options
29+
-------
30+
31+
You can set the following configuration options using the command line:
32+
33+
.. list-table::
34+
:header-rows: 1
35+
:widths: 15 60
36+
37+
* - Option
38+
- Definition
39+
40+
* - :ref:`networkTraffic <compass-configure-network-traffic>`
41+
- Configure |compass| to not perform outgoing network operations other
42+
than those to the database.
43+
44+
Learn More
45+
----------
46+
47+
- :ref:`<config-file>`

source/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Expand your knowledge of MongoDB by using Compass with other MongoDB products.
154154
/connect
155155
/instance
156156
/manage-data
157+
/config-file
157158
/import-export
158159
/embedded-shell
159160
/aggregation-pipeline-builder

0 commit comments

Comments
 (0)