# Docker Compose file for ViniPlay services: # Define the main application service. viniplay: # Build from the Dockerfile in the current directory. #build: . image: viniplay-dev:latest # Set a consistent name for the container for easy management. container_name: viniplay # Map port 8998 on your host machine to port 8998 inside the container. ports: - "8998:8998" # Define the restart policy. # 'unless-stopped' ensures the container automatically restarts if it crashes, # but not when you manually stop it. restart: unless-stopped # Add volumes for persistent data. # This maps the './viniplay-data' directory on your host to the '/data' # directory inside the container for app settings and sources. # A new volume for DVR recordings. volumes: - ./viniplay-data:/data - ./viniplay-dvr:/dvr # Mapped volume for DVR recordings # Load environment variables from a file on the host. # This allows you to set sensitive values like the session secret # without hardcoding them in the source code or this file. env_file: - ./.env # --- GPU HARDWARE ACCELERATION --- # To enable GPU transcoding, you must expose your GPU to the container. # This requires the NVIDIA Container Toolkit to be installed on your host. # # THIS SECTION IS NOW UNCOMMENTED TO ENABLE GPU ACCESS. # # For NVIDIA GPUs: # The 'deploy' block is the modern way to request GPU resources. # 'count: 1' requests one GPU. Use 'all' to pass all available GPUs. # The 'capabilities' should include 'gpu'. # # For Intel Quick Sync Video (QSV): # You need to map the /dev/dri device. UNCOMMENT the 'devices' section below. # # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu] # # devices: # - /dev/dri:/dev/dri