Skip to content

Commit f682026

Browse files
committed
feat: Add clean command to dev.sh script
1 parent 88741f6 commit f682026

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

dev.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ do_down() {
7171
do_docker_compose down
7272
}
7373

74+
# Clean all containers, images and volumes
75+
do_clean() {
76+
section_title "Cleanup containers and images"
77+
do_docker_compose down --rmi all --volumes --remove-orphans
78+
}
79+
7480
do_composer_update() {
7581
echo 'composer update'
7682
if [[ -z "${LOWEST}" ]]; then
@@ -341,6 +347,6 @@ action=${1-}
341347
if [[ -n $@ ]];then shift;fi
342348

343349
case $action in
344-
build|up|down|ps|checks|test_all|unittest|test|composer_update|notice) do_$action "$@";;
350+
build|up|down|ps|checks|test_all|unittest|test|composer_update|notice|clean) do_$action "$@";;
345351
*) do_notice;;
346352
esac

docs/content/contribute/guide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ When you finish to develop, stop the stack with:
4747
./dev.sh down
4848
```
4949

50+
If you need to clean up everything (containers, images and volumes), you can use:
51+
52+
```sh
53+
./dev.sh clean
54+
```
55+
5056
To learn more about `dev.sh` script, launch:
5157

5258
```sh

0 commit comments

Comments
 (0)