Skip to content
Merged
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
30 changes: 30 additions & 0 deletions apps/website/public/install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/bin/bash

# Function to detect if running in Proxmox LXC container
is_proxmox_lxc() {
# Check for LXC in environment
if [ -n "$container" ] && [ "$container" = "lxc" ]; then
return 0 # LXC container
fi

# Check for LXC in /proc/1/environ
if grep -q "container=lxc" /proc/1/environ 2>/dev/null; then
return 0 # LXC container
fi

return 1 # Not LXC
}

install_dokploy() {
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" >&2
Expand Down Expand Up @@ -39,6 +55,19 @@ install_dokploy() {
curl -sSL https://get.docker.com | sh
fi

# Check if running in Proxmox LXC container and set endpoint mode
endpoint_mode=""
if is_proxmox_lxc; then
echo "⚠️ WARNING: Detected Proxmox LXC container environment!"
echo "Adding --endpoint-mode dnsrr to Docker service for LXC compatibility."
echo "This may affect service discovery but is required for LXC containers."
echo ""
endpoint_mode="--endpoint-mode dnsrr"
echo "Waiting for 5 seconds before continuing..."
sleep 5
fi


docker swarm leave --force 2>/dev/null

get_ip() {
Expand Down Expand Up @@ -145,6 +174,7 @@ install_dokploy() {
--update-parallelism 1 \
--update-order stop-first \
--constraint 'node.role == manager' \
$endpoint_mode \
-e ADVERTISE_ADDR=$advertise_addr \
dokploy/dokploy:latest

Expand Down
Loading