Mercurial > libervia-backend
annotate doc/apps.rst @ 4263:2109d864a3e7
plugin XEP-470: Don't file configuration on `feature-not-implemented`.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 12 Jun 2024 22:35:13 +0200 |
parents | 00852dd54695 |
children |
rev | line source |
---|---|
4248
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 .. _libervia-app-config: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 ================================= |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 Libervia App Configuration (YAML) |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 ================================= |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 The Libervia application uses a YAML configuration file to define various aspects of the |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 application's behavior, environment, and settings. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 The file will be parsed by `PyYAML`_ which is a full-featured YAML implementation. Check |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 its documentation for details. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 Below is the documentation explaining the structure and functionality of each field in the |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 YAML file. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 ================= |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 Root-Level Fields |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 ================= |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 - ``type``: Specifies the type of the application. See :ref:`libervia-app_type`. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 - ``prepare``: Information required to prepare the environment. See :ref:`libervia-app_prepare`. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
23 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 - ``files``: Specifies files to be created with defined content. See :ref:`libervia-app_files`. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 - ``override``: Allows to override or add to default configurations. See :ref:`libervia-app_override`. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 - ``expose``: Specifies configurations exposed to frontends or administrators. See :ref:`libervia-app_expose`. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
29 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 ================== |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
31 Detailed Sections |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 =================== |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
34 .. _libervia-app_type: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
35 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 type |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 ^^^^ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
38 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
39 Currently, the only supported type is ``docker-compose``. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
41 .. _libervia-app_prepare: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
42 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 prepare |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 ^^^^^^^ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 The ``prepare`` section specifies things like git repositories to be cloned before running the application. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 Example |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 ------- |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
50 Cloning the repository at `https://example.org/some/repository.git` to prepare the app: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
51 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
52 .. code-block:: yaml |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
53 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
54 prepare: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
55 git: https://example.org/some/repository.git |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
56 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 .. _libervia-app_files: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
58 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
59 files |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
60 ^^^^^ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 The ``files`` section specifies additional files to be created for the application. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 The YAML key is the name of the file to be created, and the content specified will |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
65 populate that file. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 Example |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
68 ------- |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 Creating a file named `settings-override.py` with the content `USE_X_FORWARDED_HOST = True`: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
70 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 .. code-block:: yaml |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
72 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 files: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 settings-override.py: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
75 content: | |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
76 USE_X_FORWARDED_HOST = True |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
77 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
78 .. _libervia-app_override: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
80 override |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 ^^^^^^^^ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 The ``override`` section allows for the specification or override of configurations. This |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
84 creates a ``docker-compose.override.yml`` file that will be merged with the default |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 ``docker-compose.yml``. For more information, see `Docker documentation |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 <https://docs.docker.com/compose/reference/#specifying-multiple-compose-files>`_. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
87 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 Example |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
89 ------- |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
90 Overriding the `ports` for the `example_app` service to expose port `8080`: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
92 .. code-block:: yaml |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
93 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
94 override: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
95 services: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
96 example_app: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
97 ports: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
98 - "8080" |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
99 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
100 .. _libervia-app_expose: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
101 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
102 Exposing Data |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
103 ^^^^^^^^^^^^^ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
104 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
105 The `expose` section specifies the configurations that are exposed to users or frontends. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
106 See :ref:`libervia-app_param` for a reference of some exposed data. Ports and generated |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
107 passwords are exposed in dicts, respectively at the ``ports`` and ``passwords`` key. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
108 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
109 .. _libervia-app_yaml-tags: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
110 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
111 YAML Tags |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
112 ^^^^^^^^^ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
113 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
114 The following YAML tags can be used in the Libervia App configuration file: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
115 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
116 .. _libervia-app_conf: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
117 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
118 !libervia_conf |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
119 ++++++++++++++ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
120 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
121 Get a value from Libervia configuration. A list is expected with either: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
122 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
123 - `name` of a config parameter |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
124 - `section` and `name` of a config parameter |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
125 - `section`, `name`, and `default` value of a config parameter |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
126 - `section`, `name`, `default` value, and `filter` (either `first` or `not`) |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
127 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
128 Filter options: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
129 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
130 - `first`: get the first item of the value |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
131 - `not`: get the opposite value (to be used with booleans) |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
132 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
133 Example |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
134 ------- |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
135 Getting a value from Libervia configuration: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
136 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
137 .. code-block:: yaml |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
138 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
139 !libervia_conf [section, name, default] |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
140 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
141 .. _libervia-app_generate_pwd: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
142 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
143 !libervia_generate_pwd |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
144 +++++++++++++++++++++ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
145 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
146 Generate a password and store it in persistent data. If the password has already been generated previously, it is reused. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
147 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
148 Arguments: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
149 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
150 - `name` (str) **required**: Name of the password. Will be used to store it so it kept |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
151 between restarts. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
152 - `size` (int): Size of the password to generate. Default to 30 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
153 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
154 Example |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
155 ------- |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
156 Generating a password named ``some_password`` with a size of 32 characters: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
157 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
158 .. code-block:: yaml |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
159 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
160 !libervia_generate_pwd {name: some_password, size: 32} |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
161 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
162 .. _libervia-app_param: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
163 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
164 !libervia_param |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
165 ++++++++++++++ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
166 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
167 Get a parameter specified when starting the application. The value can be either the name |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
168 of the parameter to get, or a list as `[name, default_value]`. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
169 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
170 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
171 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
172 Available parameters: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
173 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
174 url_prefix |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
175 The internal URL where the app will be served. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
176 web_label |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
177 Label which will be used in Web frontend. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
178 web_url_path |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
179 Public facing URL path which will be used in the web frontend to access the app. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
180 web_external |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
181 If True, the web frontend will open the app in a separated page instead of embedding |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
182 it. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
183 front_url |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
184 Whole URL to access the app. It is specified when the app has its own domain or |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
185 subdomain. |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
186 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
187 Example |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
188 ------- |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
189 Getting a parameter: |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
190 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
191 .. code-block:: yaml |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
192 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
193 !libervia_param [url_prefix, /some_app] |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
194 |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
195 .. _PyYAML: https://pyyaml.org/ |
00852dd54695
doc: documentation to create a Libervia app, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
196 |