Skip to content

Conversation

@tilosp
Copy link
Member

@tilosp tilosp commented Jun 26, 2019

Fixes #345
Closes #516

Signed-off-by: Tilo Spannagel <development@tilosp.de>
@tilosp tilosp added bug examples Compose/Dockerfile/etc labels Jun 26, 2019
@tilosp tilosp requested review from J0WI and SnowMB June 26, 2019 11:09
@J0WI
Copy link
Contributor

J0WI commented Jun 26, 2019

@tilosp
Copy link
Member Author

tilosp commented Jun 26, 2019

Let's wait a few days for nextcloud/server#15187 and nextcloud/server#16064.

sure let's wait for the rc

postgres has superuser privileges. NextCloud should use the oc_ prefixed user:

It already does so with this pr, nextcloud automatically creates a user oc_test.

@J0WI J0WI merged commit 4df6f79 into master Jul 5, 2019
@delete-merged-branch delete-merged-branch bot deleted the allow-nextcloud-create-the-db branch July 5, 2019 11:50
@lukasmrtvy
Copy link

lukasmrtvy commented Aug 3, 2019

What should be fixed?

docker run -d \
--name nextcloud-postgres \
--network nexcloud-network \
--restart=unless-stopped \
-e POSTGRES_DB=nextcloud \
-e POSTGRES_PASSWORD=nextcloud \
-e POSTGRES_USER=nextcloud \
-e TZ=Europe/Prague \
postgres:11-alpine


docker run -d \
--name nextcloud \
--network nexcloud-network \
--restart=unless-stopped \
-e POSTGRES_DB=nextcloud \
-e POSTGRES_HOST=nextcloud-postgres \
-e POSTGRES_PASSWORD=nextcloud \
-e POSTGRES_USER=nextcloud \
-e NEXTCLOUD_ADMIN_PASSWORD=admin \
-e NEXTCLOUD_ADMIN_USER=admin \
-e NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.example.com \
nextcloud:16.0.3-apache 

Nextcloud log:

retrying install...
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[08006] [7] FATAL:  permission denied for database "nextcloud"
DETAIL:  User does not have CONNECT privilege.
 -> 
retrying install...
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[08006] [7] FATAL:  permission denied for database "nextcloud"
DETAIL:  User does not have CONNECT privilege.
 -> 
retrying install...
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[08006] [7] FATAL:  permission denied for database "nextcloud"
DETAIL:  User does not have CONNECT privilege.
 -> 
installing of nextcloud failed!

Its not possible to use POSTGRES_USER other than postgres ?

EDIT: Nvm,
maybe there is problem not with #784, but nextcloud/server#15187

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

Labels

bug examples Compose/Dockerfile/etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to connect to Postgres with docker-compose

4 participants