services:
  resonite:
    build: .
    # image: git.merith.xyz/oci/resonite:nightly
    network_mode: host
    stdin_open: true
    tty: true
    volumes:
      # general data
      - ./data:/data:rw

      # have volume entires in dockerfile, if removed this data will persist
      # until the volume is removed
      - ./data/resonite:/data/resonite:rw
      - ./data/steamcmd:/data/steamcmd:rw

      # mount scripts for runtime, optional
      - ./scripts:/scripts:ro

    ## EDIT THESE ENVIRONMENT VARIABLES ##
    environment:
      ## Options ## 
      ## These have their defualts set in the Dockerfile, and are safe to remove from this file

      # Prevents SteamCMD from updating the gamefiles
      DISABLE_STEAMCMD: "false"

      # Where to located the config file, defaults to /data/Config.json
      # if config file does not exist, it will generate a template one at that location
      CONFIG_FILE: "/data/Config.json"

      # overrides the command used to start the server, defaults to /scripts/99_start.sh
      COMMAND: "/scripts/99_start.sh"

      # Wether to enable the Resonite Mod Loader
      MONKEY_LOADER: false

      # list of mods to load,
      MOD_URLS: |
        https://github.com/Raidriar796/StresslessHeadless/releases/download/2.0.0-rc1/StresslessHeadless.dll
        
      # https://github.com/New-Project-Final-Final-WIP/HeadlessTweaks/releases/latest/download/HeadlessTweaks.dll

      # Controls the UID:GID of the headless, defaults to `root` if not set
      RUN_AS: 1000

      # Does not allow the server to start, helpful for debugging the container as a whole
      STOP_LAUNCH: false

    env_file:
      # Intended location for steam credentials
      - ./steamcred.env
      #  STEAM_USER, STEAM_PASS, STEAM_AUTH, STEAM_BETA