admin / Bid-Sentinel
publicBid Scrape and Tracking Application with AI Capability
Bid-Sentinel / bid-sentinel-v2 / docker-compose.yml
2469 B · main
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | services: db: # Pulled via the Docker Hub mirror (mirror.gcr.io) to avoid # registry-1.docker.io timeouts. Revert to postgres:16-alpine if needed. image: mirror.gcr.io/library/postgres:16-alpine container_name: ctt_db restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-ctt} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ctt_password} POSTGRES_DB: ${POSTGRES_DB:-ctt} volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-ctt} -d ${POSTGRES_DB:-ctt}"] interval: 5s timeout: 5s retries: 10 # Exposed only for local debugging; remove in production. ports: - "5432:5432" backend: build: context: ./backend dockerfile: Dockerfile container_name: ctt_backend restart: unless-stopped depends_on: db: condition: service_healthy environment: DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-ctt}:${POSTGRES_PASSWORD:-ctt_password}@db:5432/${POSTGRES_DB:-ctt} JWT_SECRET: ${JWT_SECRET:-change-me-in-production} JWT_ALGORITHM: ${JWT_ALGORITHM:-HS256} ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-43200} SCRAPER_ENABLED: ${SCRAPER_ENABLED:-true} SCRAPER_INTERVAL_MINUTES: ${SCRAPER_INTERVAL_MINUTES:-360} SCHEDULE_TIMEZONE: ${SCHEDULE_TIMEZONE:-Europe/London} CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:8080,http://localhost:5173} # AI bolt-on (optional). Leave the key blank to keep AI disabled. ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-} AI_MODEL: ${AI_MODEL:-claude-haiku-4-5} # Outgoing email (optional). Leave SMTP_HOST blank to hide email features. SMTP_HOST: ${SMTP_HOST:-} SMTP_PORT: ${SMTP_PORT:-587} SMTP_USERNAME: ${SMTP_USERNAME:-} SMTP_PASSWORD: ${SMTP_PASSWORD:-} SMTP_FROM: ${SMTP_FROM:-} SMTP_STARTTLS: ${SMTP_STARTTLS:-true} ports: - "8000:8000" frontend: build: context: ./frontend dockerfile: Dockerfile args: # Same-origin "/api" path, reverse-proxied to the backend by nginx. # Works on the Docker host AND from remote machines (no localhost dependency). VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/api} container_name: ctt_frontend restart: unless-stopped depends_on: - backend ports: - "8080:80" volumes: pgdata: driver: local |