Skip to content

Commit

Permalink
Merge pull request #62 from maykinmedia/issue/docker-required-envvars
Browse files Browse the repository at this point in the history
🔧 Move docker required envvars to Required group
  • Loading branch information
stevenbal authored Aug 22, 2024
2 parents ac17e91 + 03df90c commit f29580a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions open_api_framework/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,17 @@
CACHE_DEFAULT = config(
"CACHE_DEFAULT",
"localhost:6379/0",
help_text="redis cache address for the default cache",
help_text="redis cache address for the default cache (this **MUST** be set when using Docker)",
group="Required",
)
CACHE_AXES = config(
"CACHE_AXES",
"localhost:6379/0",
help_text="redis cache address for the brute force login protection cache",
help_text=(
"redis cache address for the brute force login protection cache "
"(this **MUST** be set when using Docker)"
),
group="Required",
)

CACHES = {
Expand Down Expand Up @@ -307,7 +312,8 @@
EMAIL_HOST = config(
"EMAIL_HOST",
default="localhost",
help_text="hostname for the outgoing e-mail server",
help_text="hostname for the outgoing e-mail server (this **MUST** be set when using Docker)",
group="Required",
)
EMAIL_PORT = config(
"EMAIL_PORT",
Expand Down Expand Up @@ -612,7 +618,7 @@
SUBPATH = subpath

if "GIT_SHA" in os.environ:
GIT_SHA = config("GIT_SHA", "")
GIT_SHA = config("GIT_SHA", "", add_to_docs=False)
# in docker (build) context, there is no .git directory
elif (Path(BASE_DIR) / ".git").exists():
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Available environment variables
{{group_name}}
{{group_name|repeat_char:"-"}}

{% 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 %}
{% 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 %}
{% endfor %}
{% endfor %}

Expand Down

0 comments on commit f29580a

Please sign in to comment.