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:latest
     container_name: samba
     ports:
       - "139:139"
       - "445:445"
     volumes:
       - shelfly_upload:/mount
     environment:
       - TZ=Europe/Paris
     command:
       - "-u"
       - "cangui;GHT30k7"
       - "-s"
       - "media;/mount;yes;no;no;cangui"
       - "-g"
       - "server signing = mandatory"
       - "-g"
       - "smb encrypt = disabled"
       - "-g"
       - "log level = 3"
       - "-p"

volumes:
  shelfly_upload:
  shelfly_db:
