Upgrade and maintain
Where: The server running your Docker Compose install
Who can use it: An IT admin with SSH access and sudo on the VM running Tursio
This page covers backing up, upgrading, and turning on HTTPS for a Docker Compose install of Tursio. You need the compose.yaml file path and any custom environment variables used at install time. For a first install, see Install Tursio.
Find the project name
Docker Compose names volumes and containers after its project name. The steps below use it as $project.
-
Read the project name from the running containers. The nginx container is optional. If it isn't running, use the portal or database container.
echo "NGINX (optional):" docker inspect $(docker ps -qf "name=tursio-singleportal-nginx") \ --format '{{ index .Config.Labels "com.docker.compose.project" }}' echo "PORTAL:" docker inspect $(docker ps -qf "name=tursio-singleportal-portal") \ --format '{{ index .Config.Labels "com.docker.compose.project" }}' echo "DATABASE:" docker inspect $(docker ps -qf "name=tursio-singleportal-database") \ --format '{{ index .Config.Labels "com.docker.compose.project" }}' -
Check that all values are the same.
-
Set the variable in your shell:
Back up and restore
Back up before every upgrade. Your data lives in two Docker volumes: tursio-singleportal-database-volume (PostgreSQL) and tursio-data (Tursio's files). The backup stops Tursio for a short time.
-
Stop the portal and the database so the backup is consistent:
-
Back up the internal PostgreSQL volume:
-
Back up the portal file storage:
-
Start the services again:
-
Check the backup files:
Restore from a backup
Run these from the folder that holds the backup files. Replace <date> with the date in the file names.
docker compose -p $project stop
docker run --rm \
-v ${project}_tursio-singleportal-database-volume:/restore \
-v $(pwd):/backup \
busybox tar -xzvf /backup/db_backup_<date>.tar.gz -C /restore
docker run --rm \
-v ${project}_tursio-data:/restore \
-v $(pwd):/backup \
busybox tar -xzvf /backup/portal_backup_<date>.tar.gz -C /restore
docker compose -p $project start
Deploy a new image
Tursio sends you a text file with a download link for the new image tarball, for example tursio-v0.1.0-myaccount-20251112.tar.gz. The link is valid for 12 hours.
- Download the image tarball with the link.
-
Load the image:
-
Find the image name and tag with
docker image ls. - Update
compose.yaml. Set theimage:field of bothtursio-singleportal-data-initandtursio-singleportal-portalto the new image name and tag. -
Start the new image from the folder that holds
compose.yaml:The init container runs again. It adds new starter files to the
tursio-datavolume without overwriting your files, and refreshesconfig.ini(it keeps a dated backup of the old one). The portal starts when it finishes. -
Check that the new image is running with
docker ps.
Enable HTTPS
This section applies only if you haven't set up HTTPS before.
nginx turns on HTTPS by itself when it finds a valid certificate and private key. With HTTPS on, it redirects port 80 to 443. Without them, it serves HTTP only.
- Get the certificate and key files (
cert.pemandkey.pem) for your organization. -
Point the environment variables at the files. Use full paths:
-
Apply the new configuration from the folder that holds
compose.yaml: -
Open the portal at
https://<vm-address>.
Increase the timeout
nginx waits up to 900 seconds for the portal. To change that, edit the nginx templates next to compose.yaml. nginx copies one of them into place each time it starts: tursio-nginx-https.conf with HTTPS, tursio-nginx-http.conf without.
-
Edit the timeout values inside the
location /block of both templates: -
Restart nginx to apply the change:
-
Check the values nginx uses:
Tips and limits
- Set the HTTPS variables every time.
docker composereadsUI_CERT_FILEandUI_KEY_FILEfrom your shell each time it creates the nginx container. If they are missing, nginx falls back to HTTP. To keep them, put them in a.envfile next tocompose.yaml.