version: '3.8'

services:
  shelfly:
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "4000:4000"
    extra_hosts:
      - "dockerhost:192.168.1.207"
    volumes:
      - .:/app
      - shelfly_upload:/app/upload
      - shelfly_db:/app/shelfly_db
    dns:
      - 8.8.8.8
      - 1.1.1.1
    labels:
      # tu laisses tout ce que Dokploy met déjà, ET tu ajoutes :
      - traefik.http.middlewares.webdav-allow-methods.headers.accesscontrolallowmethods=GET,PUT,POST,DELETE,PROPFIND,OPTIONS,LOCK,UNLOCK,HEAD
      - traefik.http.middlewares.webdav-allow-methods.headers.accesscontrolallowheaders=Authorization,Depth,Content-Type,If-Modified-Since,User-Agent,Destination,Overwrite
  smb:
    image: dperson/samba
    ports:
      - "139:139"
      - "445:445"
    environment:
      - USER=admin;password=supersecret
    volumes:
      - shelfly_upload:/mount   # <-- on monte le même volume Docker nommé
    command: "-u 'cangui;GHT30k7!' -s 'media;/mount;yes;no' -p"

volumes:
  shelfly_upload:
  shelfly_db:
