Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docker/deploy/etc/s6-overlay/scripts/laravel-automations
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ chown -R webuser:webgroup $WEBUSER_HOME
echo "✅ Permissions fixed."
echo ""

if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
# create symlinks
echo "🔗 Creating database symlink..."
symlinks=( \
/var/www/html/database/database.sqlite \
)

for i in "${symlinks[@]}"
do
if [[ -e "$i" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done

echo "✅ Database symlink created."
echo ""
fi

# Check for env file
if [ ! -f /config/.env ]; then
echo "🙄 Environment file not found, creating..."
Expand Down