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:
2727 cmds :
2828 - task _show_preinstall_notes
2929 - 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
3038 - docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml pull
3139 - docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml up --force-recreate --detach --remove-orphans
3240 - echo "Waiting for database to be ready"
@@ -63,6 +71,14 @@ tasks:
6371 - stop
6472 cmds :
6573 - 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
6682
6783 up :
6884 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