From 570d164a7b9fb9baf7f6772145e406914f203d2c Mon Sep 17 00:00:00 2001 From: dzinesco Date: Sat, 12 Jul 2025 19:44:52 -0600 Subject: [PATCH] fix: Load .env file in docker-deploy.sh before checking variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add environment variable loading from .env file in main() function - Use set -o allexport to export all variables from .env - Load variables before check_env_vars() is called - Fixes "Missing required environment variables" error This ensures the deployment script can access all environment variables from the .env file before validating they exist. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- scripts/docker-deploy.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/docker-deploy.sh b/scripts/docker-deploy.sh index a8d5234..5520450 100755 --- a/scripts/docker-deploy.sh +++ b/scripts/docker-deploy.sh @@ -139,6 +139,15 @@ cleanup() { main() { echo -e "${GREEN}Starting deployment process...${NC}" + # Load environment variables from .env file + if [ -f ".env" ]; then + echo -e "${BLUE}📄 Loading environment variables from .env file...${NC}" + set -o allexport + source .env + set +o allexport + echo -e "${GREEN}✅ Environment variables loaded${NC}" + fi + # Pre-deployment checks check_env_file check_env_vars