Piwigo on Docker

Start the Piwigo container

docker network create --subnet=172.97.230.0/16 piwigo-net
docker volume create piwigo-config
docker volume create piwigo-php
docker volume create piwigo-gallery
docker volume create piwigo-sql
docker run -d \
  --name=piwigo-sql \
  --net piwigo-net --ip 172.97.230.10 \
  -v piwigo-sql:/var/lib/mysql \
  -e MYSQL_DATABASE=piwigo-db \
  -e MARIADB_ROOT_PASSWORD=a2Anvpuih5zu2adw79mmc545h \
  mariadb:10.5
docker run -d \
  --name=piwigo-main \
  --net piwigo-net --ip 172.97.230.11 \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/Chicago \
  -p 8280:80 \
  -v piwigo-php:/etc/php8 \
  -v piwigo-config:/config \
  -v piwigo-gallery:/gallery \
  --restart unless-stopped \
  lscr.io/linuxserver/piwigo:latest

Plugins:
(Need to install)
Video upload support – https://piwigo.org/ext/extension_view.php?eid=610
Tag Groups – https://piwigo.org/ext/extension_view.php?eid=781
Exiftool GPS – https://piwigo.org/ext/extension_view.php?eid=850
( Enable )
LocalFiles Editor

$conf['upload_form_all_types'] = true;
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';
$conf['show_exif'] = true;
$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'ExifVersion',
  'Software',
  'DateTimeOriginal',
  'FNumber',
  'ExposureBiasValue',
  'FILE;FileSize',
  'ExposureTime',
  'Flash',
  'ISOSpeedRatings',
  'FocalLength',
  'FocalLengthIn35mmFilm',
  'WhiteBalance',
  'ExposureMode',
  'MeteringMode',
  'ExposureProgram',
  'LightSource',
  'Contrast',
  'Saturation',
  'Sharpness',
  'bitrate',
  'channel',
  'date_creation',
  'display_aspect_ratio',
  'duration',
  'filesize',
  'format',
  'formatprofile',
  'codecid',
  'frame_rate',
  'latitude',
  'longitude',
  'make',
  'model',
  'playtime_seconds',
  'sampling_rate',
  'type',
  'resolution',
  'rotation',
  );

Lower down in the config file you will find the below please delete it fully. As we have added it higher up in the config file.

// in the upload form, let users upload only picture_exts or all file_exts?
// for some file types, Piwigo will try to generate a pwg_representative
// (TIFF, videos, PDF)
$conf['upload_form_all_types'] = false;

Allowing larger file upload sizes / This must be done from the host server.

sed -i '/upload_max_filesize = 100M/c\upload_max_filesize = 2048M' /var/lib/docker/volumes/piwigo-php/_data/php.ini

sed -i '/max_file_uploads = 20/c\max_file_uploads = 200' /var/lib/docker/volumes/piwigo-php/_data/php.ini

sed -i '/default_socket_timeout = 60/c\default_socket_timeout = 120' /var/lib/docker/volumes/piwigo-php/_data/php.ini

sed -i '/post_max_size = 100M/c\post_max_size = 2048M' /var/lib/docker/volumes/piwigo-php/_data/php.ini

docker restart piwigo-main

Was this helpful?

0 / 0