mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-26 01:16:56 +00:00
Add a config option for the postgres database port
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
d8a73f8786
commit
047c3555ba
7 changed files with 46 additions and 7 deletions
|
|
@ -1,6 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
nc -z "$POSTGRES_HOST" 5432 || exit 0
|
||||
# Set a default value for POSTGRES_PORT
|
||||
if [ -z "$POSTGRES_PORT" ]; then
|
||||
POSTGRES_PORT=5432
|
||||
fi
|
||||
|
||||
|
||||
# POSTGRES_HOST must be set in the containers env vars and POSTGRES_PORT has a default above
|
||||
# shellcheck disable=SC2153
|
||||
nc -z "$POSTGRES_HOST" "$POSTGRES_PORT" || exit 0
|
||||
|
||||
if ! nc -z localhost 9000; then
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue