services:
  backup-http:
    image: abassi/node-http-server:latest
    restart: unless-stopped
    volumes:
      - /backup:/dir_to_serve
    labels:                     
      - "traefik.enable=true"
      - "traefik.http.middlewares.backup-server-stripprefix.stripprefix.prefixes=/backup"                      
      - "traefik.http.services.backup-server.loadbalancer.server.port=8080"
      - "traefik.http.routers.backup-server.entrypoints=websecure"                                              
      - "traefik.http.routers.backup-server.tls.certresolver=myresolver"                                        
      - "traefik.http.routers.backup-server.rule=Host(`$DOMAIN`) && PathPrefix(`/backup`)"                     
      - "traefik.http.routers.backup-server.middlewares=backup-server-stripprefix"                           
    networks:                                                                                         
      - chains
    
  backup-dav:
    image: 117503445/go_webdav:latest
    restart: unless-stopped
    environment:
      - "dav=/null,/webdav,null,null,false"
    volumes:
      - /backup:/webdav
    labels:                     
      - "traefik.enable=true"
      - "traefik.http.middlewares.backup-storage-stripprefix.stripprefix.prefixes=/dav"                      
      - "traefik.http.services.backup-storage.loadbalancer.server.port=80"
      - "traefik.http.routers.backup-storage.entrypoints=websecure"                                              
      - "traefik.http.routers.backup-storage.tls.certresolver=myresolver"                                        
      - "traefik.http.routers.backup-storage.rule=Host(`$DOMAIN`) && PathPrefix(`/dav`)"                     
      - "traefik.http.routers.backup-storage.middlewares=backup-storage-stripprefix"
    networks:                                                                                         
      - chains

