2021-01-28 22:04:37 +01:00
|
|
|
---
|
|
|
|
title: Updating
|
|
|
|
description:
|
|
|
|
published: true
|
2021-02-25 19:14:04 +01:00
|
|
|
date: 2021-02-25T18:05:36.497Z
|
2021-01-28 22:04:37 +01:00
|
|
|
tags:
|
2021-03-14 18:15:53 +01:00
|
|
|
editor: markdown
|
2021-01-28 22:04:37 +01:00
|
|
|
dateCreated: 2021-01-28T20:40:27.192Z
|
|
|
|
---
|
|
|
|
|
2019-01-24 19:07:19 +01:00
|
|
|
## Invidious releases are based on tags. You can use them if you want to be sure your instance is stable.
|
|
|
|
|
|
|
|
#### With release tags
|
|
|
|
```bash
|
|
|
|
$ sudo -i -u invidious
|
|
|
|
$ cd invidious
|
2019-02-09 19:14:03 +01:00
|
|
|
$ currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
|
2019-01-24 19:07:19 +01:00
|
|
|
$ git pull
|
2019-03-05 01:56:30 +01:00
|
|
|
$ latestVersion=$(git describe --tags --abbrev=0)
|
2019-01-24 19:07:19 +01:00
|
|
|
$ git checkout $latestVersion
|
2019-08-26 23:14:06 +02:00
|
|
|
$ for i in `git rev-list --reverse --abbrev-commit $currentVersion..HEAD` ; do file=./config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done
|
2019-02-28 17:51:33 +01:00
|
|
|
$ shards update && shards install
|
2019-01-24 19:07:19 +01:00
|
|
|
$ crystal build src/invidious.cr --release
|
|
|
|
$ exit
|
|
|
|
$ sudo systemctl restart invidious.service
|
|
|
|
```
|
|
|
|
|
|
|
|
#### With master branch
|
|
|
|
```bash
|
|
|
|
$ sudo -i -u invidious
|
|
|
|
$ cd invidious
|
2019-02-09 19:14:03 +01:00
|
|
|
$ currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
|
2019-01-24 19:07:19 +01:00
|
|
|
$ git pull
|
2019-08-26 23:14:06 +02:00
|
|
|
$ for i in `git rev-list --reverse --abbrev-commit $currentVersion..HEAD` ; do file=./config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done
|
2019-02-28 17:51:33 +01:00
|
|
|
$ shards update && shards install
|
2019-01-24 19:07:19 +01:00
|
|
|
$ crystal build src/invidious.cr --release
|
|
|
|
$ exit
|
|
|
|
$ sudo systemctl restart invidious.service
|
2019-06-15 18:00:36 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
#### With Docker:
|
|
|
|
```bash
|
|
|
|
$ docker-compose pull && docker-compose up --force-recreate --build && docker image prune -f
|
2019-01-24 19:07:19 +01:00
|
|
|
```
|