added all new content authored by Paul's avatar Paul
⚠ This page is a WIP and not finished yet.
⚠ Potential optimization we should consider: Put ReSeeD into read-only mode using the admin web interface before creating the backup, und disable read-only mode again after the instance has been started with the new image (but before any manual migrations have been performed). Possible issue: If the new reseed images perform some automatic migration steps on first start, those might collide with read-only mode still being enabled at this point.
## Stop ReSeeD instance
Execute as user `reseed` on the VM on which your `ReSeeD` instance is running:
```shell
cd reseed
docker compose -f docker-compose.yml down
```
## Backup `volumes` directory
This step is specific to each ReSeeD instance. For example, you could do something like
```shell
# This requires root because most files and directories will be owned by other user IDs
sudo cp -a volumes volumes_OLD_IMAGE_ID
```
## Determine updates to the `.env` file
This is done by checking the git history of the `.env.template` file in the respective branch of the ReSeeD git repo from which you built your container images.
## Update and execute `create_volume_directories.sh`
Update the `create_volume_directories.sh` script to the version from the ReSeeD git branch from which you built the container images that you are deploying. Then execute the script:
```shell
./create_volume_directories.sh
```
## Determine updates to the `docker-compose.yml` file
This is done by checking the git history of the `docker-compose.yml` file in the respective branch of the ReSeeD git repo from which you built your container images.
The check can be done like this:
```shell
cd GIT_DIRECTORY
git fetch --all BRANCH
git checkout BRANCH
diff --color -rup PATH/TO/ACTUAL/docker-compose.yml docker-compose.yml
```
If there are changes (and you want to overwrite your current `docker-compose.yml` file with those):
```shell
cp -a docker-compose.yml PATH/TO/ACTUAL/docker-compose.yml
cd GIT_DIRECTORY
```
## Tag the transferred images as latest
⚠ Please do **NOT** just copy and paste the `DOCKER_IMAGE_TAG`. Change it to the actual value.
```shell
# Export the docker image tag from the transferred images
export DOCKER_IMAGE_TAG="v1.0-beta1-159-gabc123d_1970-02-16T12-02-56UTC"
# Check the docker image tag
echo $DOCKER_IMAGE_TAG
docker image tag "reseed-app:${DOCKER_IMAGE_TAG}" "reseed-app:latest"
docker image tag "reseed-web:${DOCKER_IMAGE_TAG}" "reseed-web:latest"
docker image tag "reseed-workers:${DOCKER_IMAGE_TAG}" "reseed-workers:latest"
```
## Start ReSeeD instance again
```shell
docker compose -f docker-compose.yml up -d
# Follow and check logs during start of the containers:
docker-compose -f docker-compose.yml logs --follow
```
In general, this step should take between 2 and 5 minutes. A good indicator/rule of thumb is to watch `top` and wait until no processes with more than 10% of CPU load are running for at least 10 seconds.
\ No newline at end of file