Skip to content

Commit

Permalink
Fix the missing directory on docker init
Browse files Browse the repository at this point in the history
  • Loading branch information
JhumanJ committed Aug 28, 2024
1 parent 2503595 commit 54e24e2
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docker/php-fpm-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,19 @@ run_server() {
}

prep_storage() {
[ -L storage ] || {
mkdir -p /etc/initial-storage
if [ ! -d /etc/initial-storage/app ]; then
echo "Backing up initial storage directory"
rm -rf /etc/initial-storage
mv ./storage /etc/initial-storage
}
cp -a ./storage/* /etc/initial-storage/
fi

[ -d /persist/storage ] || {
mkdir -p /persist/storage
if [ ! -d /persist/storage/app ]; then
echo "Initialising blank storage dir"
mkdir -p /persist
cp -a /etc/initial-storage /persist/storage
chmod 777 -R /persist/storage
}
cp -a /etc/initial-storage/* /persist/storage/
fi

chmod -R 777 /persist/storage

touch /var/log/opnform.log
chown www-data /var/log/opnform.log
Expand Down

0 comments on commit 54e24e2

Please sign in to comment.