services:
  crawler:
    build: .
    image: atproto-1440news-crawler
    container_name: atproto-1440news-crawler
    restart: unless-stopped
    stop_grace_period: 30s
    env_file:
      - pds.env
    environment:
      DB_HOST: infra-postgres
      DB_PORT: 5432
      DB_USER: dba_1440_news
      DB_PASSWORD_FILE: /run/secrets/db_password
      DB_NAME: db_1440_news
    secrets:
      - db_password
    volumes:
      - ./vertices.txt.gz:/app/vertices.txt.gz:ro
    networks:
      - atproto

secrets:
  db_password:
    file: ../../../infra/postgres/secrets/dba_1440_news_password.txt

networks:
  atproto:
    external: true
