Skip to content

Commit 3984b89

Browse files
authored
[Bugfix] added back sqlite symlink (alexjustesen#706)
1 parent 13a3605 commit 3984b89

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docker/deploy/etc/s6-overlay/scripts/laravel-automations

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@ chown -R webuser:webgroup $WEBUSER_HOME
1515
echo "✅ Permissions fixed."
1616
echo ""
1717

18+
if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
19+
# create symlinks
20+
echo "🔗 Creating database symlink..."
21+
symlinks=( \
22+
/var/www/html/database/database.sqlite \
23+
)
24+
25+
for i in "${symlinks[@]}"
26+
do
27+
if [[ -e "$i" && ! -L "$i" ]]; then
28+
rm -rf "$i"
29+
fi
30+
if [[ ! -L "$i" ]]; then
31+
ln -s /config/"$(basename "$i")" "$i"
32+
fi
33+
done
34+
35+
echo "✅ Database symlink created."
36+
echo ""
37+
fi
38+
1839
# Check for env file
1940
if [ ! -f /config/.env ]; then
2041
echo "🙄 Environment file not found, creating..."

0 commit comments

Comments
 (0)