Installation
Relatively easy with Docker Compose, with an image supplied by LinuxServer. The image adds several tools that come in handy for certain plugins, such as video support (ffmpeg
, exiftool
, mediainfo
), and automatically configuring max POST filesize.
Their provided Docker Compose neglects to add in a database server, so I've taken the liberty to add MariaDB below.
version: "2.1" services: database: image: mariadb:10.5 container_name: piwigo-db environment: - MYSQL_ROOT_PASSWORD=thisIsASamplePassword - MYSQL_LOG_CONSOLE=true volumes: - /var/piwigo/db:/var/lib/mysql networks: - piwigo-net piwigo: image: ghcr.io/linuxserver/piwigo container_name: piwigo environment: - PUID=1000 - PGID=1000 - TZ=Asia/Singapore volumes: - /var/piwigo/config:/config - /var/piwigo/gallery:/gallery - [PATH_TO_MORE_PHOTOS]:/files ports: - 44310:443 - 80010:80 networks: - piwigo-net restart: unless-stopped networks: piwigo-net: {}
There should be no problem having multiple databases exposed to the same port. For Docker containers, access to DB is controlled by specifying the network the container is running in.
The SQL database for Piwigo needs to be manually initialized. Some hints, noting the DB password is the one you specified in your Docker Compose file, e.g. thisIsASamplePassword
.
$ docker exec -it piwigo bash root@aff6829999f9:/# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 977 Server version: 10.5.11-MariaDB-1:10.5.11+maria~focal mariadb.org binary distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE piwigo;
Issues
Encountering a 504 Gateway Timeout error on Nginx side, when attempting to synchronize a large number of photos. Not an isolated problem. Likely need to increase number of concurrent connections, or some timeout value. Shouldn't be too difficult.
A quick workaround mentioned in a forum post is to comment out the offending line 401 in admin/include/functions_upload.inc.php
, i.e. fetchRemote($derivative_url, $dest);
.