fix: add verification output for .env configuration

This commit is contained in:
Ollama
2026-05-15 10:50:17 +02:00
parent acbb3c1639
commit f76acbb693

View File

@@ -163,6 +163,7 @@ if [ -f ".env.example" ]; then
fi
if [ -f ".env" ]; then
echo -e "${COLOR_BLUE}Configuring .env file...${COLOR_RESET}"
sed -i "s/database\.default\.hostname = 'localhost'/database.default.hostname = '${DB_HOST}'/" .env
sed -i "s/database\.default\.database = 'ospos'/database.default.database = '${DB_NAME}'/" .env
sed -i "s/database\.default\.username = 'admin'/database.default.username = '${DB_USER}'/" .env
@@ -173,7 +174,11 @@ if [ -f ".env" ]; then
if grep -q "encryption\.key = ''" .env; then
ENCRYPTION_KEY=$(openssl rand -base64 32)
sed -i "s/encryption\.key = ''/encryption.key = '${ENCRYPTION_KEY}'/" .env
echo -e "${COLOR_BLUE}Generated encryption key${COLOR_RESET}"
fi
echo -e "${COLOR_BLUE}Verifying .env configuration...${COLOR_RESET}"
grep -E "database\.default\.(hostname|database|username|password)|encryption\.key|CI_ENVIRONMENT" .env | head -10
fi
echo -e "${COLOR_GREEN}[8/9] Importing database schema...${COLOR_RESET}"