mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-30 11:14:59 -04:00
fix: add verification output for .env configuration
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user