From f927e489049931e360b445586f77b4b55e35b592 Mon Sep 17 00:00:00 2001 From: Egor Deev Date: Tue, 6 Oct 2026 22:19:27 +0300 Subject: [PATCH] =?UTF-8?q?Docker-=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=20=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=B0=20=D0=B2=20GHCR=20=D0=BF=D0=BE=20=D1=82?= =?UTF-8?q?=D0=B5=D0=B3=D1=83=20v*,=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=20=D0=B2=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 35 +++++++++++++++++++++++++++++++++++ README.en.md | 9 +++++++++ README.md | 9 +++++++++ 3 files changed, 53 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..4ebb972 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,35 @@ +name: Docker + +on: + push: + tags: ["v*"] + workflow_dispatch: + +jobs: + image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/edeev/mospoly-helper + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=raw,value=latest + - uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/README.en.md b/README.en.md index cf4a917..e7f1a02 100644 --- a/README.en.md +++ b/README.en.md @@ -3,6 +3,7 @@ [Русский](README.md) · **English** [![CI](https://github.com/EDeev/mospoly-helper/actions/workflows/ci.yml/badge.svg)](https://github.com/EDeev/mospoly-helper/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/EDeev/mospoly-helper)](https://github.com/EDeev/mospoly-helper/releases) A Telegram bot that sends a video route to a classroom in Moscow Polytechnic University buildings: pick a campus, type the room number and get a video note with the way from the campus gate or from the building @@ -32,6 +33,14 @@ cp .env.example .env # BOT_TOKEN from @BotFather docker compose up -d ``` +**Prebuilt image** (videos inside, the route cache is built on the fly): + +```bash +docker run -d -e BOT_TOKEN=token -v mospoly-cache:/app/src/data/cache -v mospoly-users:/app/src/data/users ghcr.io/edeev/mospoly-helper +``` + +(same as `git.deev.su/edeev/mospoly-helper`). + Without Docker: Python 3.10+, FFmpeg, `pip install -r requirements.txt`, then `cd src/code && BOT_TOKEN=… python bot.py`. More in [QUICKSTART.md](QUICKSTART.md) and [DOCKER.md](DOCKER.md) (in Russian). diff --git a/README.md b/README.md index 8ce8519..458036d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ **Русский** · [English](README.en.md) [![CI](https://github.com/EDeev/mospoly-helper/actions/workflows/ci.yml/badge.svg)](https://github.com/EDeev/mospoly-helper/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/EDeev/mospoly-helper)](https://github.com/EDeev/mospoly-helper/releases) Telegram-бот, который присылает видео-маршрут до нужной аудитории в корпусах Московского Политеха: выбираешь кампус, пишешь номер кабинета — получаешь кружок с дорогой от входа на территорию или от входа @@ -40,6 +41,14 @@ cp .env.example .env # BOT_TOKEN от @BotFather docker compose up -d ``` +**Готовый образ** (видео внутри, кеш маршрутов строится сам): + +```bash +docker run -d -e BOT_TOKEN=токен -v mospoly-cache:/app/src/data/cache -v mospoly-users:/app/src/data/users ghcr.io/edeev/mospoly-helper +``` + +(то же — `git.deev.su/edeev/mospoly-helper`). + Без Docker: Python 3.10+, FFmpeg, `pip install -r requirements.txt`, затем `cd src/code && BOT_TOKEN=… python bot.py`. Подробнее — [QUICKSTART.md](QUICKSTART.md) и [DOCKER.md](DOCKER.md).