Update tinyauth and add json
This commit is contained in:
		
							parent
							
								
									753944c57a
								
							
						
					
					
						commit
						3691988549
					
				@ -20,44 +20,44 @@ color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
    if [[ ! -d /opt/tinyauth ]]; then
 | 
			
		||||
        msg_error "No ${APP} Installation Found!"
 | 
			
		||||
        exit 1
 | 
			
		||||
    fi
 | 
			
		||||
  if [[ ! -d /opt/tinyauth ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating Alpine Packages"
 | 
			
		||||
    $STD apk update
 | 
			
		||||
    $STD apk upgrade
 | 
			
		||||
    msg_ok "Updated Alpine Packages"
 | 
			
		||||
  msg_info "Updating Alpine Packages"
 | 
			
		||||
  $STD apk update
 | 
			
		||||
  $STD apk upgrade
 | 
			
		||||
  msg_ok "Updated Alpine Packages"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating tinyauth"
 | 
			
		||||
    RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
    if [ "${RELEASE}" != "$(cat /opt/tinyauth_version.txt)" ] || [ ! -f /opt/tinyauth_version.txt ]; then
 | 
			
		||||
        $STD service tinyauth stop
 | 
			
		||||
        temp_file=$(mktemp)
 | 
			
		||||
        cp /opt/tinyauth/.env /opt
 | 
			
		||||
        rm -rf /opt/tinyauth
 | 
			
		||||
        mkdir -p /opt/tinyauth
 | 
			
		||||
        curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
 | 
			
		||||
        tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1
 | 
			
		||||
        cd /opt/tinyauth/frontend
 | 
			
		||||
        $STD bun install
 | 
			
		||||
        $STD bun run build
 | 
			
		||||
        mv dist /opt/tinyauth/internal/assets/
 | 
			
		||||
        cd /opt/tinyauth
 | 
			
		||||
        $STD go mod download
 | 
			
		||||
        CGO_ENABLED=0 go build -ldflags "-s -w"
 | 
			
		||||
        cp /opt/.env /opt/tinyauth
 | 
			
		||||
        echo "${RELEASE}" >/opt/tinyauth_version.txt
 | 
			
		||||
        rm -f "$temp_file"
 | 
			
		||||
        msg_info "Restarting tinyauth"
 | 
			
		||||
        $STD service tinyauth start
 | 
			
		||||
        msg_ok "Restarted tinyauth"
 | 
			
		||||
        msg_ok "Updated tinyauth"
 | 
			
		||||
    else
 | 
			
		||||
        msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
    fi
 | 
			
		||||
    exit 0
 | 
			
		||||
  msg_info "Updating tinyauth"
 | 
			
		||||
  RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [ "${RELEASE}" != "$(cat /opt/tinyauth_version.txt)" ] || [ ! -f /opt/tinyauth_version.txt ]; then
 | 
			
		||||
    $STD service tinyauth stop
 | 
			
		||||
    temp_file=$(mktemp)
 | 
			
		||||
    cp /opt/tinyauth/.env /opt
 | 
			
		||||
    rm -rf /opt/tinyauth
 | 
			
		||||
    mkdir -p /opt/tinyauth
 | 
			
		||||
    curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
 | 
			
		||||
    tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1
 | 
			
		||||
    cd /opt/tinyauth/frontend
 | 
			
		||||
    $STD bun install
 | 
			
		||||
    $STD bun run build
 | 
			
		||||
    mv dist /opt/tinyauth/internal/assets/
 | 
			
		||||
    cd /opt/tinyauth
 | 
			
		||||
    $STD go mod download
 | 
			
		||||
    CGO_ENABLED=0 go build -ldflags "-s -w"
 | 
			
		||||
    cp /opt/.env /opt/tinyauth
 | 
			
		||||
    echo "${RELEASE}" >/opt/tinyauth_version.txt
 | 
			
		||||
    rm -f "$temp_file"
 | 
			
		||||
    msg_info "Restarting tinyauth"
 | 
			
		||||
    $STD service tinyauth start
 | 
			
		||||
    msg_ok "Restarted tinyauth"
 | 
			
		||||
    msg_ok "Updated tinyauth"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										51
									
								
								frontend/public/json/alpine-tinyauth.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								frontend/public/json/alpine-tinyauth.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,51 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "Alpine-tinyauth",
 | 
			
		||||
  "slug": "alpine-tinyauth",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    6
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-04-28",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 3000,
 | 
			
		||||
  "documentation": "https://tinyauth.app/docs/getting-started.html",
 | 
			
		||||
  "website": "https://tinyauth.app/",
 | 
			
		||||
  "logo": "https://raw.githubusercontent.com/steveiliop56/tinyauth/refs/heads/main/frontend/public/android-chrome-192x192.png",
 | 
			
		||||
  "config_path": "/opt/tinyauth/.env",
 | 
			
		||||
  "description": "Tinyauth is a simple authentication middleware that adds simple username/password login or OAuth with Google, Github and any generic provider to all of your docker apps. It is designed for traefik but it can be extended to work with all reverse proxies like caddy and nginx.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/alpine-tinyauth.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 1,
 | 
			
		||||
        "ram": 256,
 | 
			
		||||
        "hdd": 3,
 | 
			
		||||
        "os": "alpine",
 | 
			
		||||
        "version": "3.21"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "type": "alpine",
 | 
			
		||||
      "script": "ct/alpine-tinyauth.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 1,
 | 
			
		||||
        "ram": 256,
 | 
			
		||||
        "hdd": 3,
 | 
			
		||||
        "os": "alpine",
 | 
			
		||||
        "version": "3.21"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "info",
 | 
			
		||||
      "text": "`cat ~/tinyauth.creds` to view login credentials"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user