diff --git a/automation/start-automation.sh b/automation/start-automation.sh index 2290cc0..588c9fb 100755 --- a/automation/start-automation.sh +++ b/automation/start-automation.sh @@ -12,6 +12,7 @@ set -e +DOCKER_COMPOSE="docker compose" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" @@ -43,41 +44,41 @@ EOF case "${1:-help}" in start) echo "Starting LWVWV automation container..." - docker-compose up -d + $DOCKER_COMPOSE up -d echo "Container started. Use '$0 logs' to view logs." ;; stop) echo "Stopping LWVWV automation container..." - docker-compose down + $DOCKER_COMPOSE down echo "Container stopped." ;; restart) echo "Restarting LWVWV automation container..." - docker-compose restart + $DOCKER_COMPOSE restart echo "Container restarted." ;; logs) echo "Viewing container logs..." shift # Remove 'logs' from args - docker-compose logs "$@" + $DOCKER_COMPOSE logs "$@" ;; run-now) echo "Triggering subscription immediately..." - docker exec lwvwv-subscriber /app/run-subscription.sh + $DOCKER_COMPOSE exec lwvwv-subscriber /app/run-subscription.sh ;; status) echo "Container status:" - docker-compose ps + $DOCKER_COMPOSE ps ;; build) echo "Rebuilding container image..." - docker-compose build --no-cache + $DOCKER_COMPOSE build --no-cache echo "Build complete. Use '$0 start' to start." ;;