Skip to content

Commit

Permalink
docs: installation guide (#12)
Browse files Browse the repository at this point in the history
* docs: installation guide
* docs: nightly channel
  • Loading branch information
Alexander authored Aug 21, 2024
1 parent cbef179 commit 84d8b45
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 2 deletions.
7 changes: 7 additions & 0 deletions apps/docs/.vitepress/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export default defineConfig({
{ text: 'Getting Started', link: '/started' },
],
},
{
text: 'Advanced',
base: '/advanced',
items: [
{ text: 'Nightly release', link: '/nightly-release' },
],
},
{
text: 'Other',
base: '/other',
Expand Down
7 changes: 7 additions & 0 deletions apps/docs/.vitepress/locales/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export default defineConfig({
{ text: 'Начало работы', link: '/started' },
],
},
{
text: 'Расширенное',
base: '/ru/advanced',
items: [
{ text: 'Ночной канал', link: '/nightly-release' },
],
},
{
text: 'Прочее',
base: '/ru/other',
Expand Down
22 changes: 22 additions & 0 deletions apps/docs/en/advanced/nightly-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Nightly Channel

::: warning
“Nightly” channel supports only Docker containers. If you use LXC containers, you can only receive the update in stable versions.
:::

The nightly release channel allows you to use Shorter built directly from the latest commits in the repository.

Once the commit is merged into the `main` branch of [Shorter](https://github.com/hywax/shorter) and passes all tests, we run an automatic release of the docker image using GitHub Actions.

You can use these “nightly” releases to beta test new features and changes.

The build and publishing method and quality of these nightly releases are the same as stable releases. The only difference is that you should check the GitHub repository frequently for updates. There is a small chance that regressions are not caught by the review process and automated tests. That's why we use this channel to double-check everything before each release.

To start using the “night” channel, modify the docker image tag

```
services:
web:
image: ghcr.io/hywax/shorter-web:latest // [!code --]
image: ghcr.io/hywax/shorter-web:nightly // [!code ++]
```
39 changes: 38 additions & 1 deletion apps/docs/en/guide/installation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# Installation

<!--@include: ../_parts/message-not-documented.md-->
## Docker

Shorter uses Docker containers as delivery. Since the code is stored on GitHub, so are the containers themselves.
You can use absolutely any method to run these containers.

### Docker run:

```shell
docker run -p 3000:3000 -v ./data/:/app/data ghcr.io/hywax/shorter-web
```

### Docker compose:
```yaml
version: '3.8'

services:
web:
image: ghcr.io/hywax/shorter-web:latest
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- ./data:/app/data
```
### Docker volumes
All possible paths into the container.
| Path | Type | Description |
|----------------------------------|------|----------------------------|
| `/app/data/db.sqlite3` | file | Database SQLite |
| `/app/public/email/logotype.png` | file | Logotype 150x150 for email |

## Nightly release

The nightly release channel allows you to use Shorter built directly from the latest commits in the repository.
More details can be found [here](../advanced/nightly-release.md)
22 changes: 22 additions & 0 deletions apps/docs/ru/advanced/nightly-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ночной канал

::: warning Внимание
"Ночной" канал поддерживает только Docker контейнеры. Если вы используете LXC контейнеры, то получать обновление можно только в стабильных версиях.
:::

Канал ночных релизов позволяет использовать Shorter, собранный непосредственно из последних коммитов в репозитории.

После того как коммит сливается в `main` ветку [Shorter](https://github.com/hywax/shorter) и проходит все тесты, мы запускаем автоматический релиз docker image, используя GitHub Actions.

Вы можете использовать эти "ночные" выпуски для бета-тестирования новых функций и изменений.

Метод сборки и публикации, а также качество этих "ночных" релизов такие же, как и стабильных. Единственное отличие заключается в том, что вы должны часто проверять репозиторий GitHub на наличие обновлений. Существует небольшая вероятность того, что регрессии не будут отловлены в процессе рецензирования и автоматическими тестами. Поэтому мы используем этот канал, чтобы перепроверять все перед каждым релизом.

Чтобы начать использовать "ночной" канал, изменить тег docker образа

```
services:
web:
image: ghcr.io/hywax/shorter-web:latest // [!code --]
image: ghcr.io/hywax/shorter-web:nightly // [!code ++]
```
39 changes: 38 additions & 1 deletion apps/docs/ru/guide/installation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# Установка

<!--@include: ../_parts/message-not-documented.md-->
## Docker

В качестве поставки Shorter использует Docker контейнеры. Так как код хранится на Github, то и сами контейнеры тоже.
Вы можете использовать абсолютно любой метод запуска этих контейнеров.

### Docker run:

```shell
docker run -p 3000:3000 -v ./data/:/app/data ghcr.io/hywax/shorter-web
```

### Docker compose:
```yaml
version: '3.8'

services:
web:
image: ghcr.io/hywax/shorter-web:latest
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- ./data:/app/data
```
### Docker volumes
Все возможные пути в контейнер.
| Путь | Тип | Описание |
|----------------------------------|------|---------------------------|
| `/app/data/db.sqlite3` | Файл | База данных SQLite |
| `/app/public/email/logotype.png` | Файл | Логотип 150x150 для email |

## Ночной канал

Канал ночных релизов позволяет использовать Shorter, собранный непосредственно из последних коммитов в репозитории.
Подробнее можно ознакомиться [здесь](../advanced/nightly-release.md)

0 comments on commit 84d8b45

Please sign in to comment.