diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index cfb4378..9e77d9c 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -12,6 +12,11 @@ if [ ! -f ".env" ]; then fi echo -e "\n====================== Validating environment... ====================== " +if [ $(stat -c '%U' .) != "www-data" ]; then + echo " > Setting correct permissions for application..." + chown -R www-data:www-data . +fi + if ( ! grep -q "^APP_KEY=" ".env" || grep -q "^APP_KEY=$" ".env"); then echo " > Ah, APP_KEY is missing in .env file. Generating a new key!"