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:
@@ -139,6 +139,15 @@ cleanup() {
|
|||||||
main() {
|
main() {
|
||||||
echo -e "${GREEN}Starting deployment process...${NC}"
|
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
|
# Pre-deployment checks
|
||||||
check_env_file
|
check_env_file
|
||||||
check_env_vars
|
check_env_vars
|
||||||
|
|||||||
Reference in New Issue
Block a user