#!/bin/bash # Script to check if required Docker images exist # Set colors for output GREEN='\033[0;32m' YELLOW='\033[1;33m' RED='\033[0;31m' NC='\033[0m' # No Color echo -e "${YELLOW}Checking Docker images for Easy Appointments...${NC}" # Images to check APP_IMAGE="git.nixc.us/colin/easy-appointments:production" DB_IMAGE="git.nixc.us/colin/easy-appointments:production-mariadb" # Check app image echo -e "\n${YELLOW}Checking application image: ${APP_IMAGE}${NC}" if docker pull $APP_IMAGE >/dev/null 2>&1; then echo -e "${GREEN}✓ Image $APP_IMAGE exists and is pullable${NC}" else echo -e "${RED}✗ Image $APP_IMAGE does not exist or is not pullable${NC}" echo -e "${YELLOW}Let's check if you have login access to git.nixc.us:${NC}" docker login git.nixc.us fi # Check db image echo -e "\n${YELLOW}Checking database image: ${DB_IMAGE}${NC}" if docker pull $DB_IMAGE >/dev/null 2>&1; then echo -e "${GREEN}✓ Image $DB_IMAGE exists and is pullable${NC}" else echo -e "${RED}✗ Image $DB_IMAGE does not exist or is not pullable${NC}" fi echo -e "\n${YELLOW}Looking for similar images that might exist:${NC}" docker image ls | grep "easy-appointments" || echo -e "${RED}No easy-appointments images found locally${NC}" echo -e "\n${YELLOW}Recommended next steps:${NC}" echo "1. Make sure you've logged in to git.nixc.us: docker login git.nixc.us" echo "2. Build and push the images: docker compose -f docker-compose.production.yml build && docker compose -f docker-compose.production.yml push" echo "3. Deploy the stack: docker stack deploy --with-registry-auth -c stack.production.yml easy-appointments"