Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

docker-compose.yaml does not work out of the box #3944

Closed
kendalharland opened this issue Dec 10, 2023 · 0 comments
Closed

docker-compose.yaml does not work out of the box #3944

kendalharland opened this issue Dec 10, 2023 · 0 comments

Comments

@kendalharland
Copy link

kendalharland commented Dec 10, 2023

1. What is not working as documented?

The example docker-compose.yaml file at this link does not work out of the box. I ran into the following errors and had to make the following non-obvious changes to get this server running with docker compose:

  1. Photoprism can't connect to mariadb - connection is refused

To fix this you have to log into mariadb and create the photoprism user, since that is the user that appears in docker-compose.yaml

# When prompted for a password, just press enter without entering anything/
docker compose exec mariadb mariadb -u root -p

CREATE USER 'photoprism'@'%' IDENTIFIED BY 'insecure;
GRANT ALL PRIVILEGES ON *.* TO 'photoprism'@'%';
FLUSH PRIVILEGES;
  1. Photoprism fails to startup with error: "unknown database 'photoprism'".

If you log into mariadb and run SHOW DATABASES; you'll notice there's no photoprism database. This is probably a bug in mariadb
as photoprism's mariadb configuration in docker-compose.yaml file does contain the environment variable: MARIADB_DATABASE=photoprism but it seems this is completely ignored by mariadb. I am not sure if this is the correct solution, but I got this to work by changing this line, so that photoprism uses the existing mysql database:

# OLD
PHOTOPRISM_DATABASE_NAME: "photoprism"         # MariaDB or MySQL database schema name

# NEW
PHOTOPRISM_DATABASE_NAME: "mysql"         # MariaDB or MySQL database schema name

After these steps I'm able to navigate to localhost:2342 and see photoprism's landing page.

@kendalharland kendalharland added the bug Something isn't working label Dec 10, 2023
@lastzero lastzero removed the bug Something isn't working label Dec 10, 2023
@photoprism photoprism locked and limited conversation to collaborators Dec 10, 2023
@lastzero lastzero converted this issue into discussion #3945 Dec 10, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants