mirror of
https://github.com/andrey271192/amnezia-web-pro-deploy.git
synced 2026-09-20 13:50:06 +00:00
feat: one-line quick-install with PAT prompt
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,6 +23,16 @@ set -a
|
||||
source "${ENV_FILE}"
|
||||
set +a
|
||||
|
||||
trim_crlf() {
|
||||
local v="$1"
|
||||
v="${v//$'\r'/}"
|
||||
v="${v#"${v%%[![:space:]]*}"}"
|
||||
v="${v%"${v##*[![:space:]]}"}"
|
||||
printf '%s' "$v"
|
||||
}
|
||||
GHCR_USERNAME="$(trim_crlf "${GHCR_USERNAME:-}")"
|
||||
GHCR_TOKEN="$(trim_crlf "${GHCR_TOKEN:-}")"
|
||||
|
||||
printf '%s\n' "${GHCR_TOKEN}" | docker login ghcr.io -u "${GHCR_USERNAME}" --password-stdin
|
||||
"${COMPOSE[@]}" -f "${COMPOSE_FILE}" --env-file "${ENV_FILE}" pull
|
||||
"${COMPOSE[@]}" -f "${COMPOSE_FILE}" --env-file "${ENV_FILE}" up -d
|
||||
|
||||
Reference in New Issue
Block a user