version: '3.8' services: postgres: image: postgres:14-alpine container_name: mynest-postgres restart: unless-stopped environment: POSTGRES_DB: mynest POSTGRES_USER: mynest POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mynest123} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U mynest -d mynest"] interval: 5s timeout: 10s retries: 10 start_period: 30s networks: - mynest aria2: image: p3terx/aria2-pro:latest container_name: mynest-aria2 restart: unless-stopped environment: - RPC_SECRET=${ARIA2_SECRET:-mynest123} - LISTEN_PORT=6888 - RPC_PORT=6800 - UMASK_SET=022 - PUID=0 - PGID=0 - RPC_LISTEN_ALL=true # BT/Magnet 下载完成后不做种 - SEED_TIME=0 # 代理配置(可选) - HTTP_PROXY=${HTTP_PROXY:-} - HTTPS_PROXY=${HTTPS_PROXY:-} - http_proxy=${HTTP_PROXY:-} - https_proxy=${HTTPS_PROXY:-} - NO_PROXY=${NO_PROXY:-localhost,127.0.0.1} ports: - "6801:6800" # 外部访问端口 - "6889:6888" # BT 端口 - "6889:6888/udp" volumes: - ${DOWNLOAD_DIR:-./downloads}:/downloads - aria2_config:/config networks: - mynest healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:6800/jsonrpc"] interval: 5s timeout: 10s retries: 10 start_period: 20s ariang: image: p3terx/ariang container_name: mynest-ariang restart: unless-stopped environment: - ARIA2_RPC_HOST=aria2 - ARIA2_RPC_PORT=6800 - ARIA2_RPC_SECRET=${ARIA2_SECRET:-mynest123} - ARIA2_RPC_SECURE=false ports: - "6880:6880" networks: - mynest depends_on: - aria2 command: --port 6880 --ipv6 mynest: image: ${DOCKER_USERNAME:-sunxiao0721}/mynest:${VERSION:-latest} container_name: mynest restart: unless-stopped ports: - "${PORT:-3001}:80" depends_on: - postgres - aria2 environment: RUN_MODE: production DB_HOST: postgres DB_PORT: 5432 DB_USER: mynest DB_PASSWORD: ${POSTGRES_PASSWORD:-mynest123} DB_NAME: mynest ARIA2_RPC_URL: http://aria2:6800/jsonrpc ARIA2_RPC_SECRET: ${ARIA2_SECRET:-mynest123} ARIA2_DOWNLOAD_DIR: /downloads # 代理配置(可选) HTTP_PROXY: ${HTTP_PROXY:-} HTTPS_PROXY: ${HTTPS_PROXY:-} http_proxy: ${HTTP_PROXY:-} https_proxy: ${HTTPS_PROXY:-} NO_PROXY: ${NO_PROXY:-localhost,127.0.0.1,postgres,aria2} volumes: - ${DOWNLOAD_DIR:-./downloads}:/downloads - ${LOG_DIR:-./logs}:/app/logs networks: - mynest healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"] interval: 10s timeout: 15s retries: 6 start_period: 60s # telegram-bot 现在作为 mynest 容器内的独立进程运行 volumes: postgres_data: driver: local aria2_config: driver: local networks: mynest: driver: bridge