Skip to content

Commit e01bfbd

Browse files
committed
Set default host only if option was informed
1 parent c29b266 commit e01bfbd

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

bin/localscript/update-docker-compose-file.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ local_update_docker_compose_file()
3838
run_function docker_compose_replace_string $LOCAL_FULL_PATH "$REPLACE_DOCKER_GEN_SERVICE_NAME" "$DOCKER_GEN_SERVICE_NAME"
3939
run_function docker_compose_replace_string $LOCAL_FULL_PATH "$REPLACE_LETSENCRYPT_SERVICE_NAME" "$LETSENCRYPT_SERVICE_NAME"
4040

41-
# Uncomment in case of IPv6 activation or uncomment
41+
# Uncomment in case of IPv6 activation or comment
4242
[[ "$ACTIVATE_IPV6" == true ]] && run_function file_uncomment_line_with_string ${LOCAL_FULL_PATH%/}"/docker-compose.yml" "IPv6" && run_function file_uncomment_line_with_string ${LOCAL_FULL_PATH%/}"/docker-compose.yml" "IPV6"
4343
[[ ! "$ACTIVATE_IPV6" == true ]] && run_function file_comment_line_with_string ${LOCAL_FULL_PATH%/}"/docker-compose.yml" "IPv6" && run_function file_comment_line_with_string ${LOCAL_FULL_PATH%/}"/docker-compose.yml" "IPV6"
4444
# We are aware that it will set two '#' if the IPv6 is already commented
4545

46+
# Uncomment in case of Default Host activation
47+
[[ ! $ARG_DEFAULT_HOST == "" ]] && run_function file_uncomment_line_with_string ${LOCAL_FULL_PATH%/}"/docker-compose.yml" "DEFAULT_HOST"
48+
4649
return 0
4750
}

bin/localscript/update-env-new-site-variables.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ local_update_env_new_site_variables()
7676
run_function env_update_variable $LOCAL_FILE_PATH "DEFAULT_EMAIL" "$DEFAULT_EMAIL"
7777

7878
# Default host
79-
run_function env_update_variable $LOCAL_FILE_PATH "DEFAULT_HOST" "${ARG_DEFAULT_HOST:-localhost}"
79+
[[ ! $ARG_DEFAULT_HOST == "" ]] && run_function env_update_variable $LOCAL_FILE_PATH "DEFAULT_HOST" "${ARG_DEFAULT_HOST}"
8080

8181
return 0
8282
}

bin/localscript/usage-fresh-start.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ Usage:
116116
-sp | --ssl-policy Proxy SSL suport
117117
(default: Mozilla-Intermediate)
118118
119+
Default Host
120+
--default-host The default host where nginx-proxy will redirect any request
121+
(default: localhost - which will return a 503)
122+
119123
IPv6 support
120124
--activate-ipv6 Use to activate IPv6 support
121125
-ipv6 | --ipv6-address IPv6 address for external connectivity

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
# - "${IPv6:-::0}:${DOCKER_HTTPS:-443}:443"
1515
environment:
1616
SSL_POLICY: ${SSL_POLICY:-Mozilla-Intermediate}
17-
DEFAULT_HOST: ${DEFAULT_HOST:-localhost}
17+
# DEFAULT_HOST: ${DEFAULT_HOST}
1818
# ENABLE_IPV6: "true"
1919
volumes:
2020
- ${NGINX_FILES_PATH:-./data}/conf.d:/etc/nginx/conf.d

0 commit comments

Comments
 (0)