Skip to content

How to update

Tim Witzdam edited this page Sep 1, 2024 · 1 revision

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 (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.

# This command simply prints out the JWT_SECRET env variable of the docker container
docker exec GitSave env | grep JWT_SECRET | cut -d'=' -f2

3. Actual update process

Now we can begin the update process:

docker pull timwitzdam/gitsave:latest
docker stop GitSave
docker rm GitSave
# Default run command. Make sure to change the JWT_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} --name GitSave timwitzdam/gitsave:latest
Clone this wiki locally