Page 1 of 1

Photoprism

Posted: 13 Nov 2023, 22:45
by manya2000
I installed photoprism in Docker and finally got it to work with mariadb. Terrific app.

My only problem is that i have photoprism using ipaddress 172.17.0.2 and mariadb using 172.17.0.3
On Photosprism, i am pointing to the mariadb server like this:
PHOTOPRISM_DATABASE_SERVER=172.17.0.3

And it works fine, really nice.

But today i rebooted my F2-423 and mariadb aquired address 172.17.0.2 and my photoprism stopped working as it was looking for 172.17.0.3

How can I make the IP address static for mariadb in Docker?

If anyone needs help with photoprism/mariadb, pm me.
Photprism with the default sqlite always works, but way too many database locked issues and with mariadb it is faster.

Re: Photoprism

Posted: 21 Nov 2023, 12:59
by gerardmartinez
Hello, I think Create a user-defined network:

Code: Select all

docker network create mynetwork
```
Then, start the MariaDB container using the user-defined network and specify a static IP address:
routeros

Code: Select all

docker run --network=mynetwork --ip=172.17.0.3 --name=mariadb-container -e MYSQL_ROOT_PASSWORD=<password> -d mariadb:latest
```

Replace `<password>` with the desired password for the MariaDB root user.
Next, update the configuration of the Photoprism container to point to the static IP address:

Code: Select all

docker run --network=mynetwork -e PHOTOPRISM_DATABASE_SERVER=172.17.0.3 -d photoprism-app:latest
```

Adjust the command and container name as per your specific setup.