Maintenance
Updates
Installing updates is relatively straight forward if you are deploying using docker-compose and our container registry. If not, you are kinda on your own. The update can be done live with minimal downtime!
# Pull updates from the container registry
docker compose pull
# Redeploy the containers
docker compose up -d --force-recreate
This required you the have the latest
tag in your docker-compose.yml
file for all images. Generally, this is currently the default and recommended way to deploy the services.
Automatic updates
If you want you may also automatically update the services by using our container registry. This can e.g. be done using watchtower, kubernetes or a cronjob.
If you want to use watchtower you can add the following to your docker-compose.yml
file:
services:
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Backups and Restore
We supply you with two small scripts which allow you to incrementally backup and restore your database. These can also be run by an automatic workflow or in a cronjob. For the main instance we run a scheduled gitlab workflow.
-
./database/mariaDB_backup.sh
- creates a backup of the database and stores it in thebackups
folder in the mariadb container! This is mounted to the/tmp/backup
folder on your local machine. Make sure to mount the folder to a persistent storage in the docker compose file! -
./database/mariaDB_restore.sh
- restores the database from the latest backup. Reads thetmp/backup
folder.
This script uses the mariabackup tool which allows for incremental backups.
For an example you can see the .gitlab/backup.yml
file in the root directory of the project. This file is used to create a backup of our main instance.
Alternatively you may backup the full docker volume but this will increase the size of the backup significantly, and we do not recommend it.