services:
  postgres-backup:
    image: prodrigestivill/postgres-backup-local:16
    container_name: postgres-backup-node1
    restart: unless-stopped
    environment:
      POSTGRES_HOST: dagi-postgres
      POSTGRES_DB: daarion_main,daarion_memory,rag
      POSTGRES_USER: daarion
      POSTGRES_PASSWORD: DaarionDB2026!
      SCHEDULE: "@every 6h"
      BACKUP_KEEP_DAYS: 7
      BACKUP_KEEP_WEEKS: 4
      BACKUP_KEEP_MONTHS: 6
      POSTGRES_EXTRA_OPTS: "-Z9 --schema=public --blobs"
    volumes:
      - /opt/backups/postgres:/backups
    networks:
      - dagi-network

networks:
  dagi-network:
    external: true
