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

mixup pgsql users #54

Closed
rincewind0803 opened this issue Jan 18, 2023 · 5 comments
Closed

mixup pgsql users #54

rincewind0803 opened this issue Jan 18, 2023 · 5 comments

Comments

@rincewind0803
Copy link

rincewind0803 commented Jan 18, 2023

in https://github.com/LibrePhotos/librephotos-linux/pull/53 we drop user libreprotos
Crate user docker >>> should be librephotos
and try to assign db to user librephotos
That is imho the real issue in https://github.com/LibrePhotos/librephotos-linux/pull/52

@c0bnut
Copy link

c0bnut commented Jan 19, 2023

I can confirm after changing the user docker to librephotos the script continues, however I do get other errors regarding python later in the script.
The commit which broke this is c7be102

@derneuere
Copy link
Member

The goal is it to make the setup for the local install and the docker all in one image more similar.
The docker image uses a user named "docker" for postgres. I wanted to make this one the default.

Can you help me find out which lines I have to change for that?

@rincewind0803
Copy link
Author

That kind of explains whats happenig here, tater on the script fails again at this Line
if [[ -z "${DOCKERDEPLOY}" ]]; then rm /tmp/database_pass else echo "skipping temp database pass removal" fi
Though i'm not doing a dockerdeploy it enters the if and tries to remove the /tmp/database_pass and errors out
My guess is that its not correctly getting if local install or dockerdeploy.

I will look into it tonight.

@cahaya42
Copy link

cahaya42 commented Feb 9, 2023

I cannot find any evidence that the script creates /tmp/database_pass file.
I suggest the safest change is to update
if [[ -z "${DOCKERDEPLOY}" ]];
to include a test for file existence before removing the file
if [[ -z "${DOCKERDEPLOY}" && -f /tmp/database_pass ]]; then

@cahaya42
Copy link

cahaya42 commented Feb 9, 2023

I found in /etc/librephotos/librephotos-backend.env that DB_USER was set to docker.
The source for this file appears to resources/etc/librephotos/librephotos-backend.env, which was not changed as part of the c7be102 edit of install-librephotos.sh.

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

No branches or pull requests

4 participants