{
    "captainVersion": "2",
    "documentation": "Based on https://hub.docker.com/r/nicolaw/tiddlywiki",
    "displayName": "TiddlyWiki",
    "description": "TiddlyWiki is a personal wiki and a non-linear notebook for organising and sharing complex information",
    "dockerCompose": {
        "version": "3.3",
        "services": {
            "$$cap_appname": {
                "image": "nicolaw/tiddlywiki",
                "containerHttpPort": "8080",
                "restart": "always",
                "volumes": ["$$cap_appname-data:/var/lib/tiddlywiki"],
                "environment": {
                    "TW_USERNAME": "$$cap_wikusername",
                    "TW_PASSWORD": "$$cap_wikipassword",
                    "NODE_MEM": "$$cap_nodemem"
                }
            }
        }
    },
    "instructions": {
        "start": "TiddlyWiki is a personal wiki and a non-linear notebook for organising and sharing complex information. It is an open-source single page application wiki in the form of a single HTML file that includes CSS, JavaScript, and the content. It is designed to be easy to customize and re-shape depending on application. It facilitates re-use of content by dividing it into small pieces called Tiddlers.",
        "end": "You TiddlyWiki is deployed; it might take a minute to be ready. See https://$$cap_appname.$$cap_root_domain/#HelloThere to get started."
    },
    "variables": [
        {
            "id": "$$cap_wikusername",
            "label": "Username",
            "defaultValue": "anonymous",
            "description": "Username for authentication (leave blank for a public wiki)"
        },
        {
            "id": "$$cap_wikipassword",
            "label": "Password",
            "description": "Password for authentication (leave blank for a public wiki)"
        },
        {
            "id": "$$cap_nodemem",
            "label": "Max Memory",
            "defaultValue": "400",
            "validRegex": "/^[0-9]+$/",
            "description": "Limit the memory that the server can consume"
        }
    ]
}
