Spaces:
Paused
Paused
Download docker-compose.yml from QwertOs/DiscordBot: direct link, hf CLI and curl.
- Browser
- Download file 1.8 kB
-
https://huggingface.co/spaces/QwertOs/DiscordBot/resolve/main/docker-compose.yml
- Command line
-
hf download hf://spaces/QwertOs/DiscordBot/docker-compose.yml
-
curl -L -o docker-compose.yml https://huggingface.co/spaces/QwertOs/DiscordBot/resolve/main/docker-compose.yml
1.8 kB
| version: '3.8' | |
| services: | |
| # Discord Bot | |
| bot: | |
| build: . | |
| container_name: discord_bot | |
| restart: unless-stopped | |
| environment: | |
| - BOT_TOKEN=${BOT_TOKEN} | |
| - OWNER_ID=${OWNER_ID:-0} | |
| - DB_HOST=db | |
| - DB_PORT=5432 | |
| - DB_USER=${DB_USER:-discord_bot} | |
| - DB_PASS=${DB_PASS:-change_me_strong_password} | |
| - DB_NAME=${DB_NAME:-fan_bot} | |
| - REDIS_HOST=redis | |
| - REDIS_PORT=6379 | |
| - LOG_LEVEL=${LOG_LEVEL:-INFO} | |
| volumes: | |
| - ./transcripts:/app/transcripts | |
| - ./logs:/app/logs | |
| depends_on: | |
| db: | |
| condition: service_healthy | |
| redis: | |
| condition: service_started | |
| networks: | |
| - bot_network | |
| # PostgreSQL 数据库 | |
| db: | |
| image: postgres:15-alpine | |
| container_name: discord_bot_db | |
| restart: unless-stopped | |
| environment: | |
| POSTGRES_USER: ${DB_USER:-discord_bot} | |
| POSTGRES_PASSWORD: ${DB_PASS:-change_me_strong_password} | |
| POSTGRES_DB: ${DB_NAME:-fan_bot} | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| ports: | |
| - "${DB_EXTERNAL_PORT:-5432}:5432" | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-discord_bot} -d ${DB_NAME:-fan_bot}"] | |
| interval: 10s | |
| timeout: 5s | |
| retries: 5 | |
| networks: | |
| - bot_network | |
| # Redis 缓存 | |
| redis: | |
| image: redis:7-alpine | |
| container_name: discord_bot_redis | |
| restart: unless-stopped | |
| volumes: | |
| - redis_data:/data | |
| ports: | |
| - "${REDIS_EXTERNAL_PORT:-6379}:6379" | |
| healthcheck: | |
| test: ["CMD", "redis-cli", "ping"] | |
| interval: 10s | |
| timeout: 5s | |
| retries: 5 | |
| networks: | |
| - bot_network | |
| volumes: | |
| postgres_data: | |
| redis_data: | |
| networks: | |
| bot_network: | |
| driver: bridge | |