mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-01-19 19:32:10 +00:00
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: remnawave_bot_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-remnawave_bot}
|
|
POSTGRES_USER: ${POSTGRES_USER:-remnawave_user}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-secure_password_123}
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- bot_network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-remnawave_user} -d ${POSTGRES_DB:-remnawave_bot}"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: remnawave_bot_redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- bot_network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
bot:
|
|
build:
|
|
context: . # директория где лежит Dockerfile
|
|
dockerfile: Dockerfile
|
|
container_name: remnawave_bot
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-remnawave_user}:${POSTGRES_PASSWORD:-secure_password_123}@postgres:5432/${POSTGRES_DB:-remnawave_bot}
|
|
REDIS_URL: redis://redis:6379/0
|
|
volumes:
|
|
- ./logs:/app/logs:rw
|
|
- ./data:/app/data:rw
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "${TRIBUTE_WEBHOOK_PORT:-8081}:8081"
|
|
- "${YOOKASSA_WEBHOOK_PORT:-8082}:8082"
|
|
networks:
|
|
- bot_network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
bot_network:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.20.0.0/16
|