services: ca-db: image: postgres:16-alpine environment: POSTGRES_USER: mapmil POSTGRES_PASSWORD: mapmil POSTGRES_DB: mapmil volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U mapmil -d mapmil"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped redis: image: redis:7-alpine restart: unless-stopped ca-api: build: ./centers/analytics/api environment: DATABASE_URL: postgresql://mapmil:mapmil@ca-db:5432/mapmil REDIS_URL: redis://redis:6379/0 INTERNAL_TOKEN: dev-internal-token TEST_PI_API_KEY: test-pi-api-key-change-me volumes: - ca_uploads:/data depends_on: ca-db: condition: service_healthy redis: condition: service_started restart: unless-stopped ca-frontend: build: ./centers/analytics/frontend ports: - "8080:80" depends_on: - ca-api restart: unless-stopped cp-workers: build: ./centers/parsing/workers env_file: - .env environment: TELEGRAM_SESSION_PATH: /data/telegram.session CA_API_URL: http://ca-api:8000 REDIS_URL: redis://redis:6379/0 INTERNAL_TOKEN: dev-internal-token volumes: # Mount SocialParser data dir (session + SQLite journal); same file as on host - ../SocialParser/data:/data depends_on: - redis - ca-api restart: unless-stopped volumes: pgdata: ca_uploads: