services:
  ftp-server:
    image: delfer/alpine-ftp-server
    container_name: ftp_server
    restart: always
    environment:
      # Revert to simple user definition (Fixes the "/1000" path issue)
      - USERS=transcode|transcode
      - ADDRESS=transcode.fractumseraph.net
      - MIN_PORT=30000
      - MAX_PORT=30100
    ports:
      - "21:21"
      - "30000-30100:30000-30100"
    volumes:
      # SECURITY: We map the source folder as Read-Only (:ro)
      # This ensures the worker cannot delete your files, even without complex User IDs.
      - "D:/Anime/_ToBeEncoded/source:/ftp/transcode/source:ro"
      
      # We map the completed folder as Read-Write
      # This is the ONLY place the worker can write files.
      - "D:/Anime/_ToBeEncoded/completed:/ftp/transcode/completed"