fix: Load .env file in docker-deploy.sh before checking variables

- 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 <noreply@anthropic.com>
This commit is contained in:
2025-07-12 19:44:52 -06:00
parent 374bbed9e7
commit 570d164a7b

View File

@@ -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