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 1 commit into
base: master
Choose a base branch
from

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.

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