Docker update
Ce guide concerne uniquement les utilisateurs de l'image Docker officielle.
This guide only apply to the official Piwigo image, if you are using a Linux server container please use their documentation instead.
If you want to switch to the official image you can follow this guide
Step 1 - Checking for updates
Container's version numbers will always match the Piwigo version, starting from 16.3.0 they will have an extra letter after to allow container specific updates
Step 2 - Create a backup
To make sure updating is risk free, you should make a backup of both the database and the files of your Piwigo instance.
Go to the folder where your compose.yaml is
Backup your database
You can create a backup of your database using the following command (replace piwigo-db-1 by your database container name):
Backup your gallery and config files
To backup any image/photo uploaded and your current configuration to your Piwigo, copy the following folders : galleries, upload and local fromt the ./piwigo-data/piwigo/ folder.
Depending on the amount of photos you have the galleries and upload can take a lot of space
Backup your compose.yaml and .env files
Rename your compose.yaml and make a copy of your .env (par exemple rajoutant .bak à la fin)
You can use the following commands to create a backup with a timestamp
Step 3 - Pulling the new compose file and updating .env
- Download the version of the
compose.yamlthat correspond to the tag choosen during step 1
You can use the following command to fetch it, just swap <TAG> by the tag you choose (eg: 16.4a)
- Check the Github Wiki page and update your
.envfile accordingly.
Example of an update from version 15.6 to version 16.3c
.env before the update :
We add the timezone field because it was introduced in 15.7.0 and the UID/GID fields that was introduced in 16.3.0c
Step 4 - Updating and restarting the container
Pull the image with docker compose pull and restart your containers with docker compose up -d.
You can check the logs with docker compose logs to check that everyhting is working fine.