remove beta scripts from copy/paste commands

This commit is contained in:
henrygd
2025-07-24 17:35:21 -04:00
parent 16b9827c70
commit 13f3a52760

View File

@@ -3,8 +3,8 @@ import { DropdownMenuContent, DropdownMenuItem } from "./ui/dropdown-menu"
import { copyToClipboard, getHubURL } from "@/lib/utils" import { copyToClipboard, getHubURL } from "@/lib/utils"
import { i18n } from "@lingui/core" import { i18n } from "@lingui/core"
const isBeta = BESZEL.HUB_VERSION.includes("beta") // const isbeta = beszel.hub_version.includes("beta")
const imageTag = isBeta ? ":edge" : "" // const imagetag = isbeta ? ":edge" : ""
/** /**
* Get the URL of the script to install the agent. * Get the URL of the script to install the agent.
@@ -12,18 +12,20 @@ const imageTag = isBeta ? ":edge" : ""
* @returns The URL for the script. * @returns The URL for the script.
*/ */
const getScriptUrl = (path: string = "") => { const getScriptUrl = (path: string = "") => {
const url = new URL("https://get.beszel.dev") return `https://get.beszel.dev${path}`
url.pathname = path // no beta for now
if (isBeta) { // const url = new URL("https://get.beszel.dev")
url.searchParams.set("beta", "1") // url.pathname = path
} // if (isBeta) {
return url.toString() // url.searchParams.set("beta", "1")
// }
// return url.toString()
} }
export function copyDockerCompose(port = "45876", publicKey: string, token: string) { export function copyDockerCompose(port = "45876", publicKey: string, token: string) {
copyToClipboard(`services: copyToClipboard(`services:
beszel-agent: beszel-agent:
image: henrygd/beszel-agent${imageTag} image: henrygd/beszel-agent
container_name: beszel-agent container_name: beszel-agent
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
@@ -41,7 +43,7 @@ export function copyDockerCompose(port = "45876", publicKey: string, token: stri
export function copyDockerRun(port = "45876", publicKey: string, token: string) { export function copyDockerRun(port = "45876", publicKey: string, token: string) {
copyToClipboard( copyToClipboard(
`docker run -d --name beszel-agent --network host --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock:ro -v ./beszel_agent_data:/var/lib/beszel-agent -e KEY="${publicKey}" -e LISTEN=${port} -e TOKEN="${token}" -e HUB_URL="${getHubURL()}" henrygd/beszel-agent${imageTag}` `docker run -d --name beszel-agent --network host --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock:ro -v ./beszel_agent_data:/var/lib/beszel-agent -e KEY="${publicKey}" -e LISTEN=${port} -e TOKEN="${token}" -e HUB_URL="${getHubURL()}" henrygd/beszel-agent`
) )
} }