Skip to content

Commit

Permalink
fix(installation): exit of script when docker swarm init fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Oct 22, 2024
1 parent 7658599 commit d7071fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dokploy/templates/directus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
generateBase64,
generatePassword,
generateRandomDomain,
} from "../utils";

export function generate(schema: Schema): Template {
Expand Down
5 changes: 5 additions & 0 deletions apps/website/public/canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions apps/website/public/feature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions apps/website/public/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit d7071fb

Please sign in to comment.