Skip to content

Commit 391bdf5

Browse files
committed
Add inital draft desription
Part of #2066
1 parent b093c87 commit 391bdf5

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

doc/reference/configuration/index.rst

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ The Lua program almost always begins by invoking ``box.cfg()``, if the database
234234
server will be used or if ports need to be opened. For example, suppose
235235
``script.lua`` contains the lines
236236

237+
.. _index-init-example:
238+
237239
.. code-block:: lua
238240
239241
#!/usr/bin/env tarantool
@@ -296,7 +298,40 @@ dynamic, that is, they can be changed at runtime by calling ``box.cfg{}``
296298
a second time.
297299

298300
To see all the non-null parameters, say ``box.cfg`` (no parentheses). To see a
299-
particular parameter, for example the listen address, say ``box.cfg.listen``.
301+
particular parameter, for example, the listen address, say ``box.cfg.listen``.
302+
303+
Configuration parameters via environmental variables
304+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305+
306+
[TBD]--to rephrase
307+
As described/discussed before, you can specify configuration parameters :ref:`via environmental variables <index-init-example>`
308+
and then pass it to ``box.cfg{}`` by using the ``os.getenv()`` function.
309+
310+
Starting from version 2.8.1, you can specify these/such parameters via environmental variables in much easier way.
311+
312+
The name of a variable should correspond to the following pattern: ``TT_<NAME>``
313+
314+
where ``<NAME>`` is the uppercase name of the corresponding ``box.cfg`` option.
315+
316+
For example:
317+
318+
* ``TT_LISTEN``---corresponds to the ``box.cfg.listen`` option.
319+
* ``TT_REPLICATION``---corresponds to the ``box.cfg.replication`` option..
320+
321+
Array values are separated by comma. Example:
322+
323+
.. code-block:: console
324+
325+
export TT_REPLICATION=localhost:3301,localhost:3302
326+
327+
An empty variable is the same as unset one.
328+
329+
330+
331+
Parameters reference
332+
~~~~~~~~~~~~~~~~~~~~
333+
334+
[TBD]--1) title 2) intro phrase and possibly local ToC 3) downgrade levels of underlying titles
300335

301336
The following sections describe all parameters for basic operation, for storage,
302337
for binary logging and snapshots, for replication, for networking,

0 commit comments

Comments
 (0)