Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ curl -fsSL https://install.devpu.sh | sudo bash

2. **Create a GitHub App** at [devpu.sh/docs/guides/create-github-app](https://devpu.sh/docs/guides/create-github-app)

3. **Configure** by editing `/var/lib/devpush/.env` with your GitHub App credentials and domains.
3. **Configure** by editing `/var/lib/devpush/.env` with your settings:
- **GitHub App** credentials (`GITHUB_APP_*`)
- **Domains**: `APP_HOSTNAME`, `DEPLOY_DOMAIN`
- **SSL**: `LE_EMAIL` (for Let's Encrypt notifications)
- **Email**: `EMAIL_SENDER_ADDRESS`, `RESEND_API_KEY` (for login emails and invitations)

4. **Set DNS**:
- `A` `example.com` → server IP (app hostname)
Expand Down
39 changes: 38 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,43 @@ apt_install() {
return 1
}

# --- FIX: Docker install with containerd.io fallback (handles repo/CDN 404) ---
install_docker_packages() {
# First try the normal install
if apt_install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; then
return 0
fi

echo "Docker install failed; trying containerd.io version fallback..." >&2

# Force refresh lists (helps if repo was mid-sync)
rm -rf /var/lib/apt/lists/*
apt-get update -yq || true

# Get all available containerd.io versions, newest first (madison output is usually already newest-first,
# but we don't assume; we just iterate in listed order).
mapfile -t versions < <(apt-cache madison containerd.io | awk '{print $3}' | sed '/^$/d')

if [[ "${#versions[@]}" -eq 0 ]]; then
echo "No containerd.io versions found via apt-cache madison." >&2
return 1
fi

for v in "${versions[@]}"; do
echo "Trying containerd.io=$v ..." >&2
if apt-get install -yq \
-o Dpkg::Options::=--force-confdef \
-o Dpkg::Options::=--force-confold \
"containerd.io=$v" docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin; then
return 0
fi
done

echo "All containerd.io fallback versions failed." >&2
return 1
}
# --- END FIX ---

# Adds the Docker repository to the system
add_docker_repo() {
install -m 0755 -d /etc/apt/keyrings
Expand Down Expand Up @@ -247,7 +284,7 @@ run_cmd "Installing base packages" apt_install ca-certificates git jq curl gnupg
printf '\n'
printf "Installing Docker\n"
run_cmd "${CHILD_MARK} Adding Docker repository" add_docker_repo
run_cmd "${CHILD_MARK} Installing Docker packages" apt_install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
run_cmd "${CHILD_MARK} Installing Docker packages" install_docker_packages

# Ensure Docker service is running
run_cmd "${CHILD_MARK} Enabling Docker service" systemctl enable --now docker
Expand Down