services: app: build: context: ./docker/ploughshares platforms: - linux/amd64 - linux/arm64 image: ploughshares:latest ports: - "5001:5001" environment: - FLASK_RUN_PORT=5001 - POSTGRES_HOST=db - POSTGRES_PORT=5432 - POSTGRES_DB=ploughshares - POSTGRES_USER=ploughshares - POSTGRES_PASSWORD=ploughshares_password - APP_VERSION=0.4.0 - APP_ENV=development depends_on: db: condition: service_healthy volumes: - ./docker/ploughshares/uploads:/app/uploads restart: unless-stopped db: image: postgres:12 environment: - POSTGRES_DB=ploughshares - POSTGRES_USER=ploughshares - POSTGRES_PASSWORD=ploughshares_password volumes: - postgres_data:/var/lib/postgresql/data - ./docker/ploughshares/schema.sql:/docker-entrypoint-initdb.d/schema.sql healthcheck: test: ["CMD-SHELL", "pg_isready -U ploughshares"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped crawler_google_alerts: build: context: ./docker/crawler-google-alerts image: ploughshares-crawler-google-alerts:latest environment: - GOOGLE_API_KEY=${GOOGLE_API_KEY} depends_on: db: condition: service_started command: python main.py restart: unless-stopped crawler_marketline: build: context: ./docker/crawler image: ploughshares-crawler-marketline:latest environment: - GOOGLE_API_KEY=${GOOGLE_API_KEY} depends_on: db: condition: service_started command: bash run_all.sh restart: unless-stopped volumes: postgres_data: networks: ploughshares-network: driver: bridge