nano update.sh
#!/bin/bash

# Set the path to your docker-compose.yml file
COMPOSE_FILE_PATH="/root/App/docker-compose.yml"

# Navigate to the directory containing the docker-compose.yml file
cd "$(dirname "$COMPOSE_FILE_PATH")"

# Pull the latest images
docker-compose pull
#docker compose pull

# Recreate the containers with the updated images
docker-compose up -d
#docker compose up -d

# Remove old images
docker image prune -af
crontab -e
0       3       *       *       0       sh        /root/update.sh