diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 19f84cd..4057f02 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,11 +2,12 @@ cd /var/www/app -echo -e "\n====================== Validating environment... ====================== " -run_as_www_user() { +artisan_as_www_user() { su - www-data -c "/usr/local/bin/php /var/www/app/artisan $1" } +echo -e "\n====================== Validating environment... ====================== " + if [[ -z "$APP_KEY" ]]; then echo " > Oops! The required APP_KEY configuration is missing in your .env file! " echo " > Copy and paste the below key into your .env file and restart the container... " @@ -29,12 +30,12 @@ fi if [ ! -L "public/storage" ]; then echo " > Creating symbolic link for app public storage..." - run_as_www_user "storage:link" + artisan_as_www_user "storage:link" fi echo -e "\n====================== Running migrations... ====================== " run_migrations() { - run_as_www_user "migrate --force" + artisan_as_www_user "migrate --force" } RETRIES=30 DELAY=5 diff --git a/docker/mysql.conf b/docker/mysql.conf deleted file mode 100644 index 0eb286d..0000000 --- a/docker/mysql.conf +++ /dev/null @@ -1,2 +0,0 @@ -[mysqld] -cte_max_recursion_depth = 25000 \ No newline at end of file