services:
  banyaro-staging:
    build: .
    container_name: banyaro-staging
    restart: on-failure:3
    ports:
      - "3012:8000"
    volumes:
      - ./data:/data
      - /volume1/docker/banyaro/data/media:/prod-media:ro
    env_file:
      - .env
    environment:
      - DB_PATH=/data/banyaro.db
      - MEDIA_DIR=/prod-media
      - STAGING=true
      - 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
