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 DomainSchema,
|
||||||
type Schema,
|
type Schema,
|
||||||
type Template,
|
type Template,
|
||||||
generateRandomDomain,
|
|
||||||
generateBase64,
|
generateBase64,
|
||||||
generatePassword,
|
generatePassword,
|
||||||
|
generateRandomDomain,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
|
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ install_dokploy() {
|
|||||||
|
|
||||||
docker swarm init --advertise-addr $advertise_addr
|
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"
|
echo "Swarm initialized"
|
||||||
|
|
||||||
docker network rm -f dokploy-network 2>/dev/null
|
docker network rm -f dokploy-network 2>/dev/null
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ install_dokploy() {
|
|||||||
|
|
||||||
docker swarm init --advertise-addr $advertise_addr
|
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"
|
echo "Swarm initialized"
|
||||||
|
|
||||||
docker network rm -f dokploy-network 2>/dev/null
|
docker network rm -f dokploy-network 2>/dev/null
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ install_dokploy() {
|
|||||||
|
|
||||||
docker swarm init --advertise-addr $advertise_addr
|
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"
|
echo "Swarm initialized"
|
||||||
|
|
||||||
docker network rm -f dokploy-network 2>/dev/null
|
docker network rm -f dokploy-network 2>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user