mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-12 01:39:25 +02:00
Docker was creating /etc/searxng/limiter.toml as a directory instead of mounting the file, causing IsADirectoryError. The limiter is already disabled in settings.yml, so the separate toml file is not needed.
110 lines
2.5 KiB
YAML
110 lines
2.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Application PriceFlow
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: priceflow-app
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8555:8555"
|
|
environment:
|
|
- DATABASE_URL=postgresql://priceflow:priceflow@db:5432/priceflow
|
|
- BROWSERLESS_URL=ws://browserless:3000
|
|
- SEARXNG_URL=http://searxng:8080
|
|
- LOG_LEVEL=INFO
|
|
- CORS_ORIGINS=*
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
browserless:
|
|
condition: service_started
|
|
searxng:
|
|
condition: service_started
|
|
volumes:
|
|
- screenshots_data:/app/screenshots
|
|
networks:
|
|
- nginx_default
|
|
|
|
# Base de données PostgreSQL
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: priceflow-db
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5488:5432"
|
|
environment:
|
|
- POSTGRES_USER=priceflow
|
|
- POSTGRES_PASSWORD=priceflow
|
|
- POSTGRES_DB=priceflow
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U priceflow -d priceflow"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- nginx_default
|
|
|
|
# SearXNG - Moteur de recherche auto-hébergé
|
|
searxng:
|
|
image: searxng/searxng:latest
|
|
container_name: priceflow-searxng
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8888:8080"
|
|
environment:
|
|
- SEARXNG_BASE_URL=http://searxng:8080
|
|
- SEARXNG_SECRET=priceflow-searxng-secret
|
|
volumes:
|
|
- ./searxng/settings.yml:/etc/searxng/settings.yml:ro
|
|
networks:
|
|
- nginx_default
|
|
|
|
# Browserless - Navigateur headless pour le scraping
|
|
browserless:
|
|
image: ghcr.io/browserless/chromium:latest
|
|
container_name: priceflow-browserless
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3012:3000"
|
|
environment:
|
|
# Timeouts
|
|
- TIMEOUT=300000
|
|
- CONNECTION_TIMEOUT=300000
|
|
# Sessions
|
|
- CONCURRENT=3
|
|
- QUEUED=5
|
|
# Options de stabilité
|
|
- HEALTH=true
|
|
- EXIT_ON_HEALTH_FAILURE=true
|
|
# Options Chrome
|
|
- DEFAULT_HEADLESS=true
|
|
- DEFAULT_STEALTH=true
|
|
- DEFAULT_BLOCK_ADS=true
|
|
- DEFAULT_IGNORE_HTTPS_ERRORS=true
|
|
- CHROME_REFRESH_TIME=3600000
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 3G
|
|
reservations:
|
|
memory: 1G
|
|
shm_size: '2gb'
|
|
networks:
|
|
- nginx_default
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
screenshots_data:
|
|
driver: local
|
|
|
|
networks:
|
|
nginx_default:
|
|
external: true
|