Commit c4962789 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix entrypoint: quote env var values in .env to handle spaces

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 929d4d76
...@@ -7,9 +7,11 @@ mkdir -p storage/framework/{cache/data,sessions,views} storage/logs bootstrap/ca ...@@ -7,9 +7,11 @@ mkdir -p storage/framework/{cache/data,sessions,views} storage/logs bootstrap/ca
chown -R www-data:www-data storage bootstrap/cache chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache chmod -R 775 storage bootstrap/cache
# Write Docker env vars to .env so config:cache picks them up # Write Docker env vars to .env (quoted) so config:cache picks them up
# This ensures runtime env vars from CapRover override .env.example defaults : > .env
env | grep -E "^(APP_|DB_|LOG_|SESSION_|CACHE_|QUEUE_|FILESYSTEM_|BROADCAST_|MAIL_|CAPROVER_|PG_ADMIN_|SHARED_PG_|ELCAPTAIN_|TRUSTED_|BCRYPT_)" | sort > .env env | grep -E "^(APP_|DB_|LOG_|SESSION_|CACHE_|QUEUE_|FILESYSTEM_|BROADCAST_|MAIL_|CAPROVER_|PG_ADMIN_|SHARED_PG_|ELCAPTAIN_|TRUSTED_|BCRYPT_)" | sort | while IFS='=' read -r key value; do
echo "${key}=\"${value}\"" >> .env
done
# Generate APP_KEY if not set # Generate APP_KEY if not set
if [ -z "$APP_KEY" ]; then if [ -z "$APP_KEY" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment