54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
services:
|
|
redis:
|
|
env_file:
|
|
- .env
|
|
image: redis:8-alpine
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:6379:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.50'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.25'
|
|
memory: 256M
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
next-downloader-bot:
|
|
env_file:
|
|
- .env
|
|
build:
|
|
context: .
|
|
dockerfile: ./apps/bot/Dockerfile
|
|
restart: always
|
|
depends_on:
|
|
- redis
|
|
- telegram-bot-api
|
|
|
|
telegram-bot-api:
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
image: aiogram/telegram-bot-api:latest
|
|
# environment:
|
|
# TELEGRAM_API_ID: "<api-id>"
|
|
# TELEGRAM_API_HASH: "<api-hash>"
|
|
volumes:
|
|
- telegram-bot-api-data:/var/lib/telegram-bot-api
|
|
ports:
|
|
- "127.0.0.1:8081:8081"
|
|
|
|
volumes:
|
|
telegram-bot-api-data:
|
|
redis-data:
|