File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ tasks:
27
27
cmds :
28
28
- task _show_preinstall_notes
29
29
- echo "Installing"
30
+ - |
31
+ # Check if the external network 'frontend' exists, create if not
32
+ if ! docker network ls --format '{{.Name}}' | grep -wq frontend; then
33
+ echo "Creating external network 'frontend'"
34
+ docker network create frontend
35
+ else
36
+ echo "External network 'frontend' already exists"
37
+ fi
30
38
- docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml pull
31
39
- docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml up --force-recreate --detach --remove-orphans
32
40
- echo "Waiting for database to be ready"
@@ -63,6 +71,14 @@ tasks:
63
71
- stop
64
72
cmds :
65
73
- docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml down --volumes --remove-orphans
74
+ - |
75
+ # Check if the external network 'frontend' exists, remove if it does
76
+ if docker network ls --format '{{.Name}}' | grep -wq frontend; then
77
+ echo "Removing external network 'frontend'"
78
+ docker network rm frontend
79
+ else
80
+ echo "External network 'frontend' does not exist"
81
+ fi
66
82
67
83
up :
68
84
desc : Take the environment up without altering the existing state of the containers
You can’t perform that action at this time.
0 commit comments