-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
33 lines (26 loc) · 1.01 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
/var/www/html/wait-for-it.sh db:3306 -t 60
# Laravel soll seinen Logger dazu bringen, nach STDOUT zu loggen
# am besten per Konfiguration im `docker-compose.yml`
#touch /var/www/html/storage/laravel.log
#ln -sfT /dev/stdout /var/www/html/storage/logs/laravel.log;
if [ ! -f /var/www/html/.env ]; then
touch /var/www/html/.env
echo "APP_KEY=" >> /var/www/html/.env
echo "APP_URL=${APP_URL}" >> /var/www/html/.env
echo "APP_DEBUG=${APP_DEBUG}" >> /var/www/html/.env
echo "APP_ENV=${APP_ENV}" >> /var/www/html/.env
echo "APP_LOG_LEVEL=${APP_LOG_LEVEL}" >> /var/www/html/.env
echo "ADMIN_EMAIL=${ADMIN_EMAIL}" >> /var/www/html/.env
echo "ADMIN_PASSWORD=${ADMIN_PASSWORD}" >> /var/www/html/.env
echo "ADMIN_USERNAME=${ADMIN_USERNAME}" >> /var/www/html/.env
fi
php artisan key:generate
php artisan storage:link
php artisan migrate
php artisan db:seed
php artisan cache:clear
php artisan view:clear
find /var/www/html/ ! -user www-data -exec chown www-data:www-data {} \;
php-fpm &
caddy