captainVersion: 4
services:
    $$cap_appname:
        image: felddy/foundryvtt:$$cap_foundry_version
        environment:
            FOUNDRY_USERNAME: $$cap_foundry_username
            FOUNDRY_PASSWORD: $$cap_foundry_password
            FOUNDRY_ADMIN_KEY: $$cap_foundry_admin_key
            FOUNDRY_PROXY_SSL: $$cap_foundry_proxy_ssl
            FOUNDRY_MINIFY_STATIC_FILES: $$cap_foundry_minify_static_files
            CONTAINER_CACHE: $$cap_foundry_container_cache
            TIMEZONE: $$cap_foundry_timezone
        caproverExtra:
            containerHttpPort: '30000'
        volumes:
            - $$cap_appname:/data
caproverOneClickApp:
    variables:
        - id: $$cap_foundry_version
          label: Foundry VTT Version
          defaultValue: '0.8.9'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/felddy/foundryvtt/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_foundry_username
          label: Username
          defaultValue: 'user'
          description: Account username or email address for foundryvtt.com. Required for downloading an application distribution.
          validRegex: /.{1,}/
        - id: $$cap_foundry_password
          label: Password
          defaultValue: 'password'
          description: Account password for foundryvtt.com. Required for downloading an application distribution.
          validRegex: /.{1,}/
        - id: $$cap_foundry_admin_key
          label: Admin password
          description: Admin password to be applied at startup. If omitted the admin password will be cleared.
        - id: $$cap_foundry_proxy_ssl
          label: Proxy SSL
          defaultValue: 'true'
          description: Indicates whether the software is running behind a reverse proxy that uses SSL. This allows invitation links and A/V functionality to work as if the Foundry Server had SSL configured directly. CapRover has built-in reverse proxy.
          validRegex: /.{1,}/
        - id: $$cap_foundry_minify_static_files
          label: Minify static?
          defaultValue: 'true'
          description: Set to true to reduce network traffic by serving minified static JavaScript and CSS files. Enabling this setting is recommended for most users, but module developers may wish to disable it.
          validRegex: /.{1,}/
        - id: $$cap_foundry_container_cache
          label: Cache path
          defaultValue: '/data/container_cache'
          description: Set a path to cache downloads of the Foundry distribution archive and speed up subsequent container startups. The path should be in /data or another persistent mount point in the container. e.g.; /data/container_cache
        - id: $$cap_foundry_timezone
          label: Timezone
          defaultValue: 'UTC'
          description: Container TZ database name https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
          validRegex: /.{1,}/
    instructions:
        start: >-
            Foundry Virtual Tabletop is an application for organizing and running tabletop roleplaying games in a beautiful and intuitive web-based application.

            Foundry VTT is designed to modernize and simplify the virtual tabletop creation process while providing great user experience for both players and game-masters.

            Foundry VTT is available for purchase from https://foundryvtt.com



            You can get a Foundry Virtual Tabletop instance up and running in minutes using this container. This Docker container is designed to be secure, reliable, compact, and simple to use. It only requires that you provide the credentials or URL needed to download a Foundry Virtual Tabletop distribution.



            Prerequisites:

            A FoundryVTT.com account with a purchased software license.
        end: >-
            Foundry VTT has been successfully deployed. Please wait while Foundry downloads and installs latest version (could take some time depending on your internet and Foundry servers proximity).

            You HAVE TO enable Websocket Support in HTTP settings page.
    displayName: Foundry Virtual Tabletop
    isOfficial: false
    description: Foundry VTT is an application built for experiencing multiplayer tabletop RPGs where your players connect directly through the browser. REQUIRES LICENCE
    documentation: Taken from https://github.com/felddy/foundryvtt-docker
