{
    "captainVersion": "2",
    "documentation": "Taken from https://hub.docker.com/r/sourcegraph/server/",
    "displayName": "",
    "description": "Sourcegraph is a free, self-hosted code search and intelligence server that helps developers find, review, understand, and debug code",
    "dockerCompose": {
        "version": "3.3",
        "services": {
            "$$cap_appname": {
                "containerHttpPort": "7080",
                "image": "sourcegraph/server:$$cap_container_version",
                "volumes": [
                    "$$cap_appname-config:/etc/sourcegraph",
                    "$$cap_appname-data:/var/opt/sourcegraph"
                ],
                "restart": "always"
            }
        }
    },
    "instructions": {
        "start": "Sourcegraph is a code search and navigation tool (open-source/self-hosted). \n\n More information about this container can be found here: https://hub.docker.com/r/sourcegraph/server/ .\n\n After installation on CapRover, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 7080 to other CapRover apps. \n\nEnter your Sourcegraph Configuration parameters and click on next. It will take about a minute for the process to finish.",
        "end": "Sourcegraph is deployed and available as srv-captain--$$cap_appname:7080 to other apps. Open the application to create the administrator account. \n\n SECURITY: If the site has no users (i.e., during initial setup), it will always allow the first user to sign up and become site admin **without any approval** (first user to sign up becomes the admin).\n\n In order to use administration console, for critical configurations, the port 2633 needs to be mapped on the host. This port is not mapped, by default, for security reasons and because it's required only for special configurations. The administation console requires an admin username and a strong readonly password generated by the application.\n\n More information about the administration console can be found here: \nhttps://docs.sourcegraph.com/admin/management_console \n\nTo disable the signup option for other users use the administration console and change the boolean property \"allowSignup\" to false. More information here: https://docs.sourcegraph.com/admin/config/critical_config#builtin-password-authentication"
    },
    "variables": [
        {
            "id": "$$cap_container_version",
            "label": "Version",
            "defaultValue": "3.2.2",
            "description": "Check out their Docker page for the valid tags https://hub.docker.com/r/sourcegraph/server/tags",
            "validRegex": "/^([^\\s^\\/])+$/"
        }
    ]
}
