Skip to content

Commit fa5132d

Browse files
committed
feat: pass environment details to banner
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 7fd40f6 commit fa5132d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.docker/scripts/nginx-port-selector.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,17 @@ report_environment_ready() {
6060
-e ENV_EUROOFFICE_PORT="$eurooffice_port" \
6161
-e ENV_PLAYWRIGHT_PORT="$playwright_port" \
6262
-e ENV_SIGNAL_PORT="$signal_port" \
63+
-e ENV_ADMIN_USER="$NEXTCLOUD_ADMIN_USER" \
64+
-e ENV_ADMIN_PASSWORD="$NEXTCLOUD_ADMIN_PASSWORD" \
65+
-e ENV_NEXTCLOUD_BRANCH="$VERSION_NEXTCLOUD" \
6366
nextcloud sh /var/www/scripts/report-environment-ready
6467
}
6568

69+
exit_successfully() {
70+
echo '✅ Port selection complete. Exiting normally.'
71+
exit 0
72+
}
73+
6674
if [ "${HTTP_PORT+x}" = x ] || [ "${HTTPS_PORT+x}" = x ]; then
6775
echo "Explicit ports requested: HTTP ${HTTP_PORT:-80}, HTTPS ${HTTPS_PORT:-443}."
6876
set +e
@@ -78,7 +86,7 @@ if [ "${HTTP_PORT+x}" = x ] || [ "${HTTPS_PORT+x}" = x ]; then
7886
if ! report_environment_ready "${HTTP_PORT:-80}" "${HTTPS_PORT:-443}"; then
7987
echo 'Could not print environment banner.' >&2
8088
fi
81-
exit 0
89+
exit_successfully
8290
fi
8391

8492
offset=0
@@ -98,7 +106,7 @@ while [ "$offset" -le 19 ]; do
98106
if ! report_environment_ready "$http_port" "$https_port"; then
99107
echo 'Could not print environment banner.' >&2
100108
fi
101-
exit 0
109+
exit_successfully
102110
fi
103111

104112
if ! printf '%s\n' "$output" | grep -Eiq \

0 commit comments

Comments
 (0)