From 7da58b08daf37f20729bc3388be8a5a33c97fda4 Mon Sep 17 00:00:00 2001 From: Leopere Date: Thu, 24 Apr 2025 09:03:04 -0400 Subject: [PATCH] FIXUP: Update image names in docker-compose.*.yml to match stack files --- check-images.sh | 40 +++++++++++++++++++++ docker-compose.dev.yml | 6 ++-- docker-compose.production.yml | 4 +-- docker-compose.test.yml | 4 +-- docker/easy-appointments/Dockerfile.staging | 11 +----- 5 files changed, 48 insertions(+), 17 deletions(-) create mode 100755 check-images.sh diff --git a/check-images.sh b/check-images.sh new file mode 100755 index 0000000..a311343 --- /dev/null +++ b/check-images.sh @@ -0,0 +1,40 @@ +#!/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" \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a66fc40..6695bc1 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,10 +1,10 @@ # Development configuration for local testing services: - template: + easy-appointments: build: context: ./docker/easy-appointments dockerfile: Dockerfile.staging - image: template:dev + image: git.nixc.us/colin/easy-appointments:staging environment: BASE_URL: "http://localhost" DEBUG_MODE: "TRUE" @@ -24,7 +24,7 @@ services: build: context: ./docker/mariadb dockerfile: Dockerfile.staging - image: git.nixc.us/nixius/template:staging-mariadb + image: git.nixc.us/colin/template:staging-mariadb environment: - MARIADB_ROOT_PASSWORD=secret - MARIADB_DATABASE=easyappointments diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 3d70963..9ec475d 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -4,10 +4,10 @@ services: build: context: ./docker/easy-appointments dockerfile: Dockerfile.production - image: git.nixc.us/nixius/easy-appointments:production + image: git.nixc.us/colin/easy-appointments:production mariadb: build: context: ./docker/mariadb dockerfile: Dockerfile.production - image: git.nixc.us/nixius/easy-appointments:production-mariadb \ No newline at end of file + image: git.nixc.us/colin/easy-appointments:production-mariadb \ No newline at end of file diff --git a/docker-compose.test.yml b/docker-compose.test.yml index f9f5133..6ca1e36 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -4,7 +4,7 @@ services: build: context: ./docker/easy-appointments dockerfile: Dockerfile.staging - image: git.nixc.us/nixius/easy-appointments:test + image: git.nixc.us/colin/easy-appointments:test volumes: - ./docker/easy-appointments/src:/scratch - ./temp:/temp @@ -13,4 +13,4 @@ services: build: context: ./docker/mariadb dockerfile: Dockerfile.staging - image: git.nixc.us/nixius/easy-appointments:test-mariadb \ No newline at end of file + image: git.nixc.us/colin/easy-appointments:test-mariadb \ No newline at end of file diff --git a/docker/easy-appointments/Dockerfile.staging b/docker/easy-appointments/Dockerfile.staging index 55a0f12..3a477b2 100644 --- a/docker/easy-appointments/Dockerfile.staging +++ b/docker/easy-appointments/Dockerfile.staging @@ -1,10 +1 @@ -FROM alpine:3.18 - -# Create directories for volume mounts -RUN mkdir -p /scratch /temp - -# Set working directory -WORKDIR /scratch - -# Simple command to keep container running -CMD ["tail", "-f", "/dev/null"] +FROM alextselegidis/easyappointments:latest \ No newline at end of file