Skip to content

Commit

Permalink
prune docker on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed Aug 14, 2021
1 parent 9e950b0 commit e27519a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function main {
collect_static_files
start_new_image
remove_old_image
prune_docker
}

function run_compose {
Expand Down Expand Up @@ -64,6 +65,11 @@ function remove_old_image {
reload_nginx
}

function prune_docker {
docker image prune --force --all --filter 'until=168h'
docker container prune --force
}

function scale_app {
local count="${1:-1}"

Expand Down

0 comments on commit e27519a

Please sign in to comment.