Skip to content
Merged
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
1 change: 0 additions & 1 deletion .husky/commit-msg

This file was deleted.

6 changes: 0 additions & 6 deletions .husky/install.mjs

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/pre-commit

This file was deleted.

30 changes: 19 additions & 11 deletions apps/website/public/canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ install_dokploy() {
exit 1
fi


# check if is running inside a container
if [ -f /.dockerenv ]; then
echo "This script must be run on Linux" >&2
Expand All @@ -31,13 +30,13 @@ install_dokploy() {
fi

command_exists() {
command -v "$@" > /dev/null 2>&1
command -v "$@" > /dev/null 2>&1
}

if command_exists docker; then
echo "Docker already installed"
echo "Docker already installed"
else
curl -sSL https://get.docker.com | sh
curl -sSL https://get.docker.com | sh
fi

docker swarm leave --force 2>/dev/null
Expand Down Expand Up @@ -85,12 +84,23 @@ install_dokploy() {
echo "$ip"
}

advertise_addr="${ADVERTISE_ADDR:-$(get_ip)}"
get_private_ip() {
ip addr show | grep -E "inet (192\.168\.|10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[0-1]\.)" | head -n1 | awk '{print $2}' | cut -d/ -f1
}

advertise_addr="${ADVERTISE_ADDR:-$(get_private_ip)}"

if [ -z "$advertise_addr" ]; then
echo "ERROR: We couldn't find a private IP address."
echo "Please set the ADVERTISE_ADDR environment variable manually."
echo "Example: export ADVERTISE_ADDR=192.168.1.100"
exit 1
fi
echo "Using advertise address: $advertise_addr"

docker swarm init --advertise-addr $advertise_addr

if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
echo "Error: Failed to initialize Docker Swarm" >&2
exit 1
fi
Expand Down Expand Up @@ -122,7 +132,6 @@ install_dokploy() {
--network dokploy-network \
--mount type=volume,source=redis-data-volume,target=/data \
redis:7


# Installation
docker service create \
Expand Down Expand Up @@ -167,7 +176,6 @@ install_dokploy() {
# --publish mode=host,published=443,target=443,protocol=udp \
# traefik:v3.1.2


GREEN="\033[0;32m"
YELLOW="\033[1;33m"
BLUE="\033[0;34m"
Expand All @@ -184,12 +192,12 @@ install_dokploy() {
fi
}

formatted_addr=$(format_ip_for_url "$advertise_addr")
public_ip="${ADVERTISE_ADDR:-$(get_ip)}"
formatted_addr=$(format_ip_for_url "$public_ip")
echo ""
printf "${GREEN}Congratulations, Dokploy is installed!${NC}\n"
printf "${BLUE}Wait 15 seconds for the server to start${NC}\n"
printf "${YELLOW}Please go to http://${formatted_addr}:3000${NC}\n\n"
echo ""
}

update_dokploy() {
Expand Down
18 changes: 14 additions & 4 deletions apps/website/public/feature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ install_dokploy() {
exit 1
fi


# check if is running inside a container
if [ -f /.dockerenv ]; then
echo "This script must be run on Linux" >&2
Expand Down Expand Up @@ -85,7 +84,18 @@ install_dokploy() {
echo "$ip"
}

advertise_addr="${ADVERTISE_ADDR:-$(get_ip)}"
get_private_ip() {
ip addr show | grep -E "inet (192\.168\.|10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[0-1]\.)" | head -n1 | awk '{print $2}' | cut -d/ -f1
}

advertise_addr="${ADVERTISE_ADDR:-$(get_private_ip)}"

if [ -z "$advertise_addr" ]; then
echo "ERROR: We couldn't find a private IP address."
echo "Please set the ADVERTISE_ADDR environment variable manually."
echo "Example: export ADVERTISE_ADDR=192.168.1.100"
exit 1
fi
echo "Using advertise address: $advertise_addr"

docker swarm init --advertise-addr $advertise_addr
Expand Down Expand Up @@ -185,12 +195,12 @@ install_dokploy() {
fi
}

formatted_addr=$(format_ip_for_url "$advertise_addr")
public_ip="${ADVERTISE_ADDR:-$(get_ip)}"
formatted_addr=$(format_ip_for_url "$public_ip")
echo ""
printf "${GREEN}Congratulations, Dokploy is installed!${NC}\n"
printf "${BLUE}Wait 15 seconds for the server to start${NC}\n"
printf "${YELLOW}Please go to http://${formatted_addr}:3000${NC}\n\n"
echo ""
}

update_dokploy() {
Expand Down
16 changes: 14 additions & 2 deletions apps/website/public/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,18 @@ install_dokploy() {
echo "$ip"
}

advertise_addr="${ADVERTISE_ADDR:-$(get_ip)}"
get_private_ip() {
ip addr show | grep -E "inet (192\.168\.|10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[0-1]\.)" | head -n1 | awk '{print $2}' | cut -d/ -f1
}

advertise_addr="${ADVERTISE_ADDR:-$(get_private_ip)}"

if [ -z "$advertise_addr" ]; then
echo "ERROR: We couldn't find a private IP address."
echo "Please set the ADVERTISE_ADDR environment variable manually."
echo "Example: export ADVERTISE_ADDR=192.168.1.100"
exit 1
fi
echo "Using advertise address: $advertise_addr"

docker swarm init --advertise-addr $advertise_addr
Expand Down Expand Up @@ -181,7 +192,8 @@ install_dokploy() {
fi
}

formatted_addr=$(format_ip_for_url "$advertise_addr")
public_ip="${ADVERTISE_ADDR:-$(get_ip)}"
formatted_addr=$(format_ip_for_url "$public_ip")
echo ""
printf "${GREEN}Congratulations, Dokploy is installed!${NC}\n"
printf "${BLUE}Wait 15 seconds for the server to start${NC}\n"
Expand Down
Loading