services:
  banyaro:
    build: .
    container_name: banyaro
    restart: on-failure:5
    ports:
      - "3010:8000"       # DS-intern, NPM leitet banyaro.app weiter
    volumes:
      - ./data:/data      # SQLite + Media persistent
    env_file:
      - .env
    environment:
      - DB_PATH=/data/banyaro.db
      - MEDIA_DIR=/data/media
      - VAPID_PUBLIC_KEY=BMKbFAmpsqJ-eFef_4XJcYpuxPWqBNAoy9buMNnMSa6ijcPzltboHi_YccPKJrUD0isBez-vJIzAgjnLTWkzcC0
      - VAPID_PRIVATE_KEY=8PWa9vvwMqtqsJEJGcwmiLhR0_Yl7duVX3wmWiKS878
      - VAPID_CONTACT=mailto:admin@banyaro.app
    healthcheck:
      test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"]
      interval: 30s
      timeout:  10s
      retries:  3
