docker-compose.yml
Rama main · réplica de lectura del repositorio original.
services:
perepost:
image: ghcr.io/smotim/perepost:latest
restart: unless-stopped
env_file: .env
# The uid of telegram-bot-api: perepost deletes the files it downloaded
user: "101:101"
volumes:
# Routes for several channels: ./config/config.yaml (see config.example.yaml)
- ./config:/etc/perepost:ro
- bot-api-files:/var/lib/telegram-bot-api
- perepost-state:/var/lib/perepost
depends_on:
telegram-bot-api:
condition: service_started
required: false
# On shutdown the bot delivers posts it already received — up to 50 seconds
stop_grace_period: 60s
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
# Own Bot API server: files up to 2 GB instead of 20 MB. Starts only with
# COMPOSE_PROFILES=bot-api in .env (see README, "Видео больше 20 МБ").
telegram-bot-api:
image: aiogram/telegram-bot-api:latest
profiles: [bot-api]
restart: unless-stopped
environment:
TELEGRAM_API_ID: ${TELEGRAM_API_ID:-}
TELEGRAM_API_HASH: ${TELEGRAM_API_HASH:-}
TELEGRAM_LOCAL: "1"
TELEGRAM_WORK_DIR: /var/lib/telegram-bot-api
TELEGRAM_TEMP_DIR: /tmp/telegram-bot-api
volumes:
- bot-api-files:/var/lib/telegram-bot-api
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
volumes:
bot-api-files:
perepost-state: