Skip to content

Commit f29580a

Browse files
authored
Merge pull request #62 from maykinmedia/issue/docker-required-envvars
🔧 Move docker required envvars to Required group
2 parents ac17e91 + 03df90c commit f29580a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

open_api_framework/conf/base.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,17 @@
149149
CACHE_DEFAULT = config(
150150
"CACHE_DEFAULT",
151151
"localhost:6379/0",
152-
help_text="redis cache address for the default cache",
152+
help_text="redis cache address for the default cache (this **MUST** be set when using Docker)",
153+
group="Required",
153154
)
154155
CACHE_AXES = config(
155156
"CACHE_AXES",
156157
"localhost:6379/0",
157-
help_text="redis cache address for the brute force login protection cache",
158+
help_text=(
159+
"redis cache address for the brute force login protection cache "
160+
"(this **MUST** be set when using Docker)"
161+
),
162+
group="Required",
158163
)
159164

160165
CACHES = {
@@ -307,7 +312,8 @@
307312
EMAIL_HOST = config(
308313
"EMAIL_HOST",
309314
default="localhost",
310-
help_text="hostname for the outgoing e-mail server",
315+
help_text="hostname for the outgoing e-mail server (this **MUST** be set when using Docker)",
316+
group="Required",
311317
)
312318
EMAIL_PORT = config(
313319
"EMAIL_PORT",
@@ -612,7 +618,7 @@
612618
SUBPATH = subpath
613619

614620
if "GIT_SHA" in os.environ:
615-
GIT_SHA = config("GIT_SHA", "")
621+
GIT_SHA = config("GIT_SHA", "", add_to_docs=False)
616622
# in docker (build) context, there is no .git directory
617623
elif (Path(BASE_DIR) / ".git").exists():
618624
try:

open_api_framework/templates/open_api_framework/env_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Available environment variables
1313
{{group_name}}
1414
{{group_name|repeat_char:"-"}}
1515

16-
{% for var in vars %}* ``{{var.name}}``: {% if var.help_text %}{{var.help_text|safe|ensure_endswith:"."}}{% endif %}{% if var.auto_display_default and not var.default|is_undefined %} Defaults to: ``{{var.default|to_str}}``.{% endif %}
16+
{% for var in vars %}* ``{{var.name}}``: {% if var.help_text %}{{var.help_text|safe|ensure_endswith:"."}}{% endif %}{% if var.auto_display_default and not var.default|is_undefined %} Defaults to: ``{{var.default|to_str|safe}}``.{% endif %}
1717
{% endfor %}
1818
{% endfor %}
1919

0 commit comments

Comments
 (0)