How to update
1. Backup gitsave volume
Since this application is still in early development I highly suggest creating a backup of the gitsave
volume like so:
docker run --rm -i -t -v gitsave:/origin -v gitsave-backup:/destination alpine sh -c "cp -avr /origin/* /destination"
2. Store JWT_SECRET and ENCRYPTION_SECRET (if not already done)
Before deleting the old container, make sure to copy the JWT_SECRET
environment variable. Losing this, means you’ll have trouble logging in.
# These commands simply print out the JWT_SECRET and ENCRYPTION_SECRET env variables of the docker containerdocker exec GitSave env | grep JWT_SECRET | cut -d'=' -f2docker exec GitSave env | grep ENCRYPTION_SECRET | cut -d'=' -f2
3. Actual update process
Now we can begin the update process:
docker pull timwitzdam/gitsave:latestdocker stop GitSavedocker rm GitSave# Default run command. Make sure to change the JWT_SECRET, ENCRYPTION_SECRET and possibly the backups folder path.docker run -d --restart=always -p 3000:3000 -v gitsave:/app/data -v ./backups:/app/backups -e JWT_SECRET={YOUR_SECRET_HERE} -e ENCRYPTION_SECRET={YOUR_SECRET_HERE_32_CHARACTERS} -e DISABLE_AUTH=false --name GitSave timwitzdam/gitsave:latest