Browse Source

Added bin/removeall and fixed few issues

Ranger Chan 5 năm trước cách đây
mục cha
commit
15843994cb
5 tập tin đã thay đổi với 11 bổ sung5 xóa
  1. 1 0
      README.md
  2. 1 1
      compose/bin/remove
  3. 2 0
      compose/bin/removeall
  4. 6 3
      compose/bin/removevolumes
  5. 1 1
      compose/bin/status

+ 1 - 0
README.md

@@ -223,6 +223,7 @@ You'll now have an updated `bin/update` helper script, and can run it to update
 - `bin/pwa-studio`: (BETA) Start the PWA Studio server. Note that Chrome will throw SSL cert errors and not allow you to view the site, but Firefox will.
 - `bin/redis`: Run a command from the redis container. Ex. `bin/redis redis-cli monitor`
 - `bin/remove`: Remove all containers.
+- `bin/removeall`: Remove all containers, networks, volumes, and images.
 - `bin/removevolumes`: Remove all volumes.
 - `bin/restart`: Stop and then start all containers.
 - `bin/root`: Run any CLI command as root without going into the bash prompt. Ex `bin/root apt-get install nano`

+ 1 - 1
compose/bin/remove

@@ -1,2 +1,2 @@
 #!/bin/bash
-docker-compose rm
+docker-compose -f docker-compose.yml -f docker-compose.dev.yml rm --stop

+ 2 - 0
compose/bin/removeall

@@ -0,0 +1,2 @@
+#!/bin/bash
+docker-compose -f docker-compose.yml -f docker-compose.dev.yml down --rmi all --volumes

+ 6 - 3
compose/bin/removevolumes

@@ -1,5 +1,8 @@
 #!/bin/bash
 current_folder=${PWD##*/}
-docker volume rm ${current_folder}_appdata
-docker volume rm ${current_folder}_dbdata
-docker volume rm ${current_folder}_sockdata
+volume_prefix=`echo $current_folder | awk '{print tolower($0)}' | sed 's/\.//g'`
+docker volume rm ${volume_prefix}_appdata
+docker volume rm ${volume_prefix}_dbdata
+docker volume rm ${volume_prefix}_rabbitmqdata
+docker volume rm ${volume_prefix}_sockdata
+docker volume rm ${volume_prefix}_ssldata

+ 1 - 1
compose/bin/status

@@ -1,2 +1,2 @@
 #!/bin/bash
-docker-compose ps
+docker-compose -f docker-compose.yml -f docker-compose.dev.yml ps