Clean up entrypoint startup logs and remove GitHub auth handling

This commit is contained in:
cto-new[bot]
2026-02-09 16:13:58 +00:00
parent 3fb5bd1094
commit 8d4cae9707
2 changed files with 3 additions and 27 deletions

View File

@@ -166,8 +166,6 @@ validate_environment() {
"DODO_PAYMENTS_API_KEY" "DODO_PAYMENTS_API_KEY"
"ADMIN_USER" "ADMIN_USER"
"ADMIN_PASSWORD" "ADMIN_PASSWORD"
"REPO_URL"
"REPO_BRANCH"
) )
# Check critical variables # Check critical variables

View File

@@ -76,20 +76,6 @@ log "=== ENVIRONMENT SANITIZATION COMPLETE ==="
REPO_URL="${REPO_URL:-}" REPO_URL="${REPO_URL:-}"
REPO_DIR="/home/web/data" REPO_DIR="/home/web/data"
REPO_BRANCH="${REPO_BRANCH:-main}" REPO_BRANCH="${REPO_BRANCH:-main}"
GITHUB_USERNAME="${GITHUB_USERNAME:-}"
GITHUB_PAT="${GITHUB_PAT:-}"
# Helper function to get authenticated repository URL
get_auth_url() {
local url="$1"
if [ -n "$GITHUB_USERNAME" ] && [ -n "$GITHUB_PAT" ]; then
# Extract the repository path from the URL
local repo_path=$(echo "$url" | sed 's|https://github.com/||')
echo "https://${GITHUB_USERNAME}:${GITHUB_PAT}@github.com/${repo_path}"
else
echo "$url"
fi
}
log "Initializing Shopify AI App Builder..." log "Initializing Shopify AI App Builder..."
@@ -123,22 +109,14 @@ if [ -n "$REPO_URL" ]; then
fi fi
log "Repository not found. Cloning $REPO_URL into $REPO_DIR..." log "Repository not found. Cloning $REPO_URL into $REPO_DIR..."
auth_url=$(get_auth_url "$REPO_URL") git clone "$REPO_URL" "$REPO_DIR"
git clone "$auth_url" "$REPO_DIR"
cd "$REPO_DIR" cd "$REPO_DIR"
log "Successfully cloned repository" log "Successfully cloned repository"
else else
# Repository exists, pull latest changes # Repository exists, pull latest changes
cd "$REPO_DIR" cd "$REPO_DIR"
log "Repository found at $REPO_DIR. Pulling latest changes from $REPO_BRANCH..." log "Repository found at $REPO_DIR. Pulling latest changes from $REPO_BRANCH..."
# Update remote URL to use authentication if credentials are available
if [ -n "$GITHUB_USERNAME" ] && [ -n "$GITHUB_PAT" ]; then
auth_url=$(get_auth_url "$REPO_URL")
log "Updating remote URL with authentication credentials"
git remote set-url origin "$auth_url"
fi
# Check if we're on a detached HEAD or have uncommitted changes # Check if we're on a detached HEAD or have uncommitted changes
if git diff --quiet && git diff --cached --quiet; then if git diff --quiet && git diff --cached --quiet; then
git fetch origin git fetch origin
@@ -155,8 +133,8 @@ if [ -n "$REPO_URL" ]; then
fi fi
log "Repository is ready at $REPO_DIR" log "Repository is ready at $REPO_DIR"
else else
log "No REPO_URL set - starting with empty workspace"
mkdir -p "$REPO_DIR" mkdir -p "$REPO_DIR"
log "Workspace directory ready at $REPO_DIR"
fi fi
log "Starting Shopify AI App Builder service..." log "Starting Shopify AI App Builder service..."