captainVersion: 4
services:
    # AdGuard
    $$cap_appname:
        image: adguard/adguardhome:$$cap_adguard_version
        restart: always
        ports:
            - 53:53
            - 67:67
            - 68:68
            - 853:853
        volumes:
            - $$cap_appname-work:/opt/adguardhome/work
            - $$cap_appname-conf:/opt/adguardhome/conf
        caproverExtra:
            containerHttpPort: '3000'
caproverOneClickApp:
    variables:
        - id: $$cap_adguard_version
          label: AdGuard Home Version
          defaultValue: 'v0.104.3'
          description: Check out their docker page for the valid tags https://hub.docker.com/r/adguard/adguardhome/tags
    instructions:
        start: >-
            AdGuard Home is a fast and easy way to block ads on any device and protect kids online!
        end: >-
            Aaaand you're done! 😄

            Now enable https and force https from HTTP Settings tabs
            After that visit https://$$cap_appname.$$cap_root_domain
            And follow the installation steps
            Make sure to change port 80 to 3000 in the installation steps

            After you are done you will be redirected to $$cap_appname.$$cap_root_domain:3000
            Just remove 3000 from the url and visit $$cap_appname.$$cap_root_domain
            You will be redirected to https://$$cap_appname.$$cap_root_domain/login.html
    displayName: 'AdGuard Home'
    isOfficial: true
    description: AdGuard Home is a fast and easy way to block ads on any device and protect kids online!
    documentation: Taken from https://hub.docker.com/r/adguard/adguardhome
