mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(installation): exit of script when docker swarm init fails
This commit is contained in:
@@ -2,9 +2,9 @@ import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateRandomDomain,
|
||||
generateBase64,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
|
||||
@@ -61,6 +61,11 @@ install_dokploy() {
|
||||
|
||||
docker swarm init --advertise-addr $advertise_addr
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to initialize Docker Swarm" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Swarm initialized"
|
||||
|
||||
docker network rm -f dokploy-network 2>/dev/null
|
||||
|
||||
@@ -45,6 +45,11 @@ install_dokploy() {
|
||||
|
||||
docker swarm init --advertise-addr $advertise_addr
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to initialize Docker Swarm" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Swarm initialized"
|
||||
|
||||
docker network rm -f dokploy-network 2>/dev/null
|
||||
|
||||
@@ -59,6 +59,11 @@ install_dokploy() {
|
||||
advertise_addr=$(get_ip)
|
||||
|
||||
docker swarm init --advertise-addr $advertise_addr
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to initialize Docker Swarm" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Swarm initialized"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user