File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,19 @@ for SERVICE in "${SERVICES[@]}"; do
18
18
19
19
cd " $BASE_DIR /$SERVICE "
20
20
21
- # Down the container
22
- echo " Stopping $SERVICE containers..."
23
- docker compose --env-file .env.prod -f docker-compose.prod.yml down
21
+ # Down the container and remove volumes
22
+ echo " Stopping $SERVICE containers and cleaning up ..."
23
+ docker compose --env-file .env.prod -f docker-compose.prod.yml down -v
24
24
25
- # Rebuild
25
+ # Remove old images
26
+ echo " Removing old images for $SERVICE ..."
27
+ docker image prune -f --filter " label=com.docker.compose.project=${PROJECT} "
28
+
29
+ # Clean build cache
30
+ echo " Cleaning build cache..."
31
+ docker builder prune -f
32
+
33
+ # Rebuild with no cache
26
34
echo " Rebuilding $SERVICE ..."
27
35
docker compose --env-file .env.prod -f docker-compose.prod.yml build --no-cache
28
36
You can’t perform that action at this time.
0 commit comments