1
0
Fork 0
mirror of https://github.com/EDeev/mospoly-helper.git synced 2026-10-07 20:49:32 +03:00

Docker-образ бота в GHCR по тегу v*, готовый образ в README

This commit is contained in:
Деев Егор Викторович 2026-10-06 22:19:27 +03:00
parent 6d077ab950
commit f927e48904
3 changed files with 53 additions and 0 deletions

35
.github/workflows/docker.yml vendored Normal file
View file

@ -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 }}

View file

@ -3,6 +3,7 @@
[Русский](README.md) · **English** [Русский](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) [![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 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 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 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 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). `cd src/code && BOT_TOKEN=… python bot.py`. More in [QUICKSTART.md](QUICKSTART.md) and [DOCKER.md](DOCKER.md) (in Russian).

View file

@ -3,6 +3,7 @@
**Русский** · [English](README.en.md) **Русский** · [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) [![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-бот, который присылает видео-маршрут до нужной аудитории в корпусах Московского Политеха: Telegram-бот, который присылает видео-маршрут до нужной аудитории в корпусах Московского Политеха:
выбираешь кампус, пишешь номер кабинета — получаешь кружок с дорогой от входа на территорию или от входа выбираешь кампус, пишешь номер кабинета — получаешь кружок с дорогой от входа на территорию или от входа
@ -40,6 +41,14 @@ cp .env.example .env # BOT_TOKEN от @BotFather
docker compose up -d 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`, затем Без 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). `cd src/code && BOT_TOKEN=… python bot.py`. Подробнее — [QUICKSTART.md](QUICKSTART.md) и [DOCKER.md](DOCKER.md).