- Added Redis service to both docker-compose files for local development and production environments. - Updated bot configuration to utilize the Grammy framework, replacing Telegraf. - Implemented graceful shutdown for the bot, ensuring proper resource management. - Refactored bot commands and removed deprecated message handling logic. - Enhanced environment variable management for Redis connection settings. - Updated dependencies in package.json to include new Grammy-related packages.
37 lines
681 B
YAML
37 lines
681 B
YAML
services:
|
|
web:
|
|
env_file:
|
|
- .env
|
|
build:
|
|
context: .
|
|
dockerfile: ./apps/web/Dockerfile
|
|
restart: always
|
|
ports:
|
|
- 3000:3000
|
|
bot:
|
|
build:
|
|
context: .
|
|
dockerfile: ./apps/bot/Dockerfile
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- redis
|
|
restart: always
|
|
|
|
redis:
|
|
image: redis:8-alpine
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
command: ['redis-server', '--requirepass', '${REDIS_PASSWORD}']
|
|
ports:
|
|
- '127.0.0.1:6379:6379'
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|