Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DB_HOST format support fix 147 #152

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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