Skip to content

Commit 347cb96

Browse files
committed
Add purge task
1 parent 5e0b4b6 commit 347cb96

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

Taskfile.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,18 @@ tasks:
3838
- task install
3939

4040
down:
41+
desc: Remove all containers
42+
deps:
43+
- stop
44+
cmds:
45+
- docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml down
46+
47+
purge:
4148
desc: Remove all containers and volumes
4249
deps:
4350
- stop
4451
cmds:
45-
- docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml down -v
52+
- docker compose --env-file .env.local --env-file .env.docker.local -f docker-compose.yml down --volumes --remove-orphans
4653

4754
up:
4855
desc: Take the environment up without altering the existing state of the containers
@@ -176,4 +183,10 @@ tasks:
176183
if grep -q '^INTERNAL_PROXY=true' .env.docker.local; then
177184
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.traefik.yml"
178185
fi
179-
docker compose --env-file .env.local --env-file .env.docker.local $COMPOSE_FILES config > docker-compose.yml
186+
docker compose --env-file .env.local --env-file .env.docker.local $COMPOSE_FILES config > docker-compose.yml
187+
188+
# Replace all occurrences of demo.os2display.dk with the value of COMPOSE_SERVER_DOMAIN
189+
DOMAIN=$(grep ^COMPOSE_SERVER_DOMAIN= .env.docker.local | cut -d '=' -f 2)
190+
if [ -n "$DOMAIN" ]; then
191+
sed -i "s/demo\.os2display\.dk/$DOMAIN/g" docker-compose.yml
192+
fi

0 commit comments

Comments
 (0)