This commit is contained in:
lubiana 2025-07-25 15:23:52 +02:00
parent 0535cd1aad
commit ebd50740f0
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
6 changed files with 249 additions and 17 deletions

39
dev-docker.sh Executable file
View file

@ -0,0 +1,39 @@
#!/bin/bash
# Development script using Docker with hot reload support
# This script builds and runs the development container
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Function to cleanup
cleanup() {
echo -e "\n${YELLOW}🛑 Shutting down development container...${NC}"
docker-compose -f docker-compose.dev.yml down
echo -e "${GREEN}✅ Development environment stopped${NC}"
exit 0
}
# Set up signal handlers
trap cleanup SIGINT SIGTERM
echo -e "${BLUE}🚀 Starting GoCheck development environment with Docker...${NC}"
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo -e "${RED}❌ Docker is not running. Please start Docker and try again.${NC}"
exit 1
fi
# Build and start the development container
echo -e "${YELLOW}📦 Building development container...${NC}"
docker-compose -f docker-compose.dev.yml up --build
# The container will keep running until interrupted
# When interrupted, the cleanup function will be called