Files
flow2api/docker-compose.proxy.yml
Netlops c21f7708a6 feat: add auto-detection for headless environments and auto-switch captcha modes
- Add helper function to detect headless/Docker environments in main.py
- Implement auto-downgrade from personal to browser captcha mode in headless environments
- Show warning messages when switching modes automatically
- Update FlowClient to accept database instance for captcha configuration

config: update default server port and enable proxy by default

- Change default server port from 8000 to 18282 in config/setting.toml
- Enable proxy by default with localhost:7897 URL
- Update Docker and docker-compose configurations to use port 38000 for API

build: add China mirror sources for faster dependency installation

- Configure Debian apt to use Tsinghua University mirrors
- Set PyPI to use Tsinghua University index with trusted host
- Configure Playwright to download from npmmirror for faster installation

chore: update gitignore to exclude data and config files

- Add data directory to .gitignore
- Exclude config/setting.toml and config/setting_warp.toml from version control

docs: update docker-compose configurations for new port mappings

- Change exposed port from 8000 to 38000 in docker-compose.yml
- Update proxy service port from 1080 to 31080 in docker-compose.proxy.yml
- Ensure proper volume mapping for Cloudflare WARP data persistence
2025-12-30 14:00:30 +08:00

37 lines
753 B
YAML

version: '3.8'
services:
flow2api:
image: thesmallhancat/flow2api:latest
container_name: flow2api
ports:
- "38000:8000"
volumes:
- ./data:/app/data
- ./config/setting_warp.toml:/app/config/setting.toml
environment:
- PYTHONUNBUFFERED=1
restart: unless-stopped
depends_on:
- warp
warp:
image: caomingjun/warp
container_name: warp
restart: always
devices:
- /dev/net/tun:/dev/net/tun
ports:
- "31080:1080"
environment:
- WARP_SLEEP=2
cap_add:
- MKNOD
- AUDIT_WRITE
- NET_ADMIN
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv4.conf.all.src_valid_mark=1
volumes:
- ./data:/var/lib/cloudflare-warp