Skip to content

Conversation

@whlsxl
Copy link
Contributor

@whlsxl whlsxl commented Jan 1, 2024

Add DB_HOST domain/ip or domain/ip:port support;
Create database when postgres database does not exist.

@whlsxl whlsxl requested a review from crazy-max as a code owner January 1, 2024 15:43
@whlsxl
Copy link
Contributor Author

whlsxl commented Jan 1, 2024

Temporary fix nextcloud/server#38750

@whlsxl
Copy link
Contributor Author

whlsxl commented Mar 20, 2024

Hello @crazy-max , do you have time to check this pull request, I rewrote the logic of setting up the database and can match the logic of nextcloud.

Comment on lines +167 to +172
if ! bash -c ${dbexist_cmd}; then
createdb -h ${dbhost} -p ${dbport} -U ${DB_USER} -E UTF8 ${DB_NAME} # nextcloud bug under 28, https://github.com/nextcloud/server/pull/38750
if ! bash -c ${dbexist_cmd}; then
echo >&2 "ERROR: Failed to create database ${DB_NAME} on $DB_HOST"
exit 1
fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With nextcloud/server#38750 merged, don't think we need this workaround anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That just one of the problems.
This container still don't support the DB_HOST set to domain/ip:port.
I didn't find the way to modify the port of the database being connected to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants